SELECT A.ORGANIZATION_ID ,
A.INVENTORY_ITEM_ID ,
B.PADDED_CONCATENATED_SEGMENTS ,
SUM(A.PRIMARY_TRANSACTION_QUANTITY) TOTAL_QOH ,
B.DESCRIPTION ITEM_DESCRIPTION ,
B.PRIMARY_UOM_CODE ,
C.ORGANIZATION_CODE ,
D.NAME ORGANIZATION_NAME ,
B.REVISION_QTY_CONTROL_CODE ITEM_REV_CONTROL ,
B.LOCATION_CONTROL_CODE ITEM_LOCATOR_CONTROL ,
B.LOT_CONTROL_CODE ITEM_LOT_CONTROL ,
B.SERIAL_NUMBER_CONTROL_CODE ITEM_SERIAL_CONTROL
FROM
MTL_ONHAND_QUANTITIES_DETAIL A,
MTL_SYSTEM_ITEMS_VL B,
MTL_PARAMETERS C,
HR_ORGANIZATION_UNITS D
WHERE
A.INVENTORY_ITEM_ID = B.INVENTORY_ITEM_ID
AND
A.ORGANIZATION_ID = B.ORGANIZATION_ID
AND
A.ORGANIZATION_ID = C.ORGANIZATION_ID
AND
A.ORGANIZATION_ID = D.ORGANIZATION_ID
GROUP BY
A.ORGANIZATION_ID,
A.INVENTORY_ITEM_ID,
B.PADDED_CONCATENATED_SEGMENTS,
B.DESCRIPTION,
B.PRIMARY_UOM_CODE,
C.ORGANIZATION_CODE,
D.NAME,
B.REVISION_QTY_CONTROL_CODE,
B.LOCATION_CONTROL_CODE,
B.LOT_CONTROL_CODE,
B.SERIAL_NUMBER_CONTROL_CODE
No comments:
Post a Comment