Query to find onhand quantity in oracle apps r12
In this post ,
We will discuss about query to find onhand quantity in oracle apps r12. This is
the complete sql query to get item onhand details in oracle apps r12.
SQL query to
find onhand quantity in oracle apps r12.
SELECT
msib.segment1 item_code ,
moqd.SUBINVENTORY_CODE
,moqd.LOCATOR_ID
,SUM(moqd.TRANSACTION_QUANTITY) onhand_quantity ,
milkfv.CONCATENATED_SEGMENTS
LOCATORS
FROM APPS.MTL_SYSTEM_ITEMS_B msib,
APPS.MTL_ONHAND_QUANTITIES_DETAIL
moqd ,
APPS.mtl_item_locations_kfv milkfv
WHERE msib.organization_id = 567
and msib.INVENTORY_ITEM_ID = moqd.INVENTORY_ITEM_ID
AND MSIB.ORGANIZATION_ID =MOQD.ORGANIZATION_ID
and moqd.SUBINVENTORY_CODE = :P_SUBINVENTORY
AND milkfv.INVENTORY_LOCATION_ID = moqd.LOCATOR_ID
AND
MSIB.SEGMENT1 = :P_ITEM
GROUP BY MSIB.SEGMENT1,MOQD.SUBINVENTORY_CODE,MILKFV.CONCATENATED_SEGMENTS
2 comments:
you forgot to include 'moqd.LOCATOR_ID' in the group by clause
is there is any query to get inbound quantity
Post a Comment