Useful SQL Query - Onhand View with Lot and Serial Information
I have found this query very useful while working on Migration Project form EBS to SAP. Might be it can help other looking for such detail as well as they can extend as per their need.
====================
SQL Query
====================
select
ohd.inventory_item_id, ohd.organization_id,ohd.item,ohd.org_code,ohd.sub_inventory,ohd.locator,msn.serial_number,
ohd.lot_number,ohd.uom,NVL2(msn.serial_number,1,ohd.total_onhand_qty) onhand_qty,ohd.total_transact_qty,ohd.total_reserve_qty,
ohd.locator_id
from (SELECT msi.inventory_item_id ,
(select max(mq.create_transaction_id) from mtl_onhand_quantities mq