SQL Query To find the PO Lines from the Purchase Order
select * from
PO_HEADERS_ALL PHA,
PO_LINES_ALL PLA
WHERE PHA.PO_HEADER_ID=PLA.PO_HEADER_ID
AND PHA.SEGMENT1=:PO_NUMBER
AND PHA.ORG_ID=:ORG_ID
PO_HEADERS_ALL PHA,
PO_LINES_ALL PLA
WHERE PHA.PO_HEADER_ID=PLA.PO_HEADER_ID
AND PHA.SEGMENT1=:PO_NUMBER
AND PHA.ORG_ID=:ORG_ID
SQL Query To find the PO Distributions Data from the Purchase Order
select PDA.* from
PO_HEADERS_ALL PHA,
PO_DISTRIBUTIONS_ALL PDA
WHERE PHA.PO_HEADER_ID=PDA.PO_HEADER_ID
AND PHA.SEGMENT1=:PO_NUMBER
AND PHA.ORG_ID=:ORG_ID
PO_HEADERS_ALL PHA,
PO_DISTRIBUTIONS_ALL PDA
WHERE PHA.PO_HEADER_ID=PDA.PO_HEADER_ID
AND PHA.SEGMENT1=:PO_NUMBER
AND PHA.ORG_ID=:ORG_ID
SQL Query To find the PO Receipts from the Purchase Order
select * from
rcv_shipment_lines RSL,
rcv_shipment_headers RSH,
PO_HEADERS_ALL PHA
where 1=1
and RSL.SHIPMENT_HEADER_ID=RSH.SHIPMENT_HEADER_ID
and RSL.po_header_id=PHA.po_header_id
and PHA.SEGMENT1=:PO_NUMBER
where 1=1
and RSL.SHIPMENT_HEADER_ID=RSH.SHIPMENT_HEADER_ID
and RSL.po_header_id=PHA.po_header_id
and PHA.SEGMENT1=:PO_NUMBER