Find out items received against the purchase order from the supplier.
SELECT APS.VENDOR_NAME "SUPPLIER",
ph.segment1 "PO NUM",
MSI.DESCRIPTION,
RCT.SOURCE_DOC_QUANTITY "RECIEVED",
TO_NUMBER (QUANTITY_RECEIVED) " NET RECIEVED",
rct.transaction_type,
TRUNC (RCT.TRANSACTION_DATE) TRANSACTION_DATE
FROM RCV_SHIPMENT_HEADERS RSH,
RCV_SHIPMENT_LINES RSL,
RCV_TRANSACTIONS RCT,
PO_LINES_ALL PL,
PO_HEADERS_ALL PH,
PO_LINE_TYPES PLT,
RCV_LOT_TRANSACTIONS LOT,
MTL_SYSTEM_ITEMS_B MSI,
AP_SUPPLIERS APS
WHERE RSH.SHIPMENT_HEADER_ID = RSL.SHIPMENT_HEADER_ID
AND RCT.SHIPMENT_LINE_ID = RSL.SHIPMENT_LINE_ID
AND PL.PO_LINE_ID = RCT.PO_LINE_ID
AND PH.PO_HEADER_ID = PL.PO_HEADER_ID
AND PLT.LINE_TYPE_ID = PL.LINE_TYPE_ID
AND lot.TRANSACTION_ID(+) = RCT.TRANSACTION_ID
AND MSI.INVENTORY_ITEM_ID = PL.ITEM_ID
AND RCT.ORGANIZATION_ID = MSI.ORGANIZATION_ID
AND APS.VENDOR_ID = RCT.VENDOR_ID
-- and ph.segment1='&PO_NUM' --Define any specific purchase order
AND rct.transaction_type = 'RECEIVE'
AND NVL (TO_NUMBER (rct.quantity_billed), 0) = '0'
AND TRUNC (RCT.TRANSACTION_DATE) BETWEEN TO_DATE ('01-07-2020',
'dd-mm-yyyy')
AND TO_DATE ('31-07-2020',
'dd-mm-yyyy')
ORDER BY APS.VENDOR_NAME DESC