link between po_headers_all and oe_order_headers_all .link between po and so in oracle apps
link between po_headers_all and oe_order_headers_all
OE_ORDER_LINES_ALL.ORIG_SYS_DOCUMENT_REF=po_requisition_HEADERs_all.SEGMENT1(Requisition
Number)
SELECT OOH.ORDER_NUMBER
SO,
PRH.SEGMENT1 REQ,
ph.segment1 "PO
Num"
FROM OE_ORDER_HEADERS_ALL OOH,
PO_REQUISITION_HEADERS_ALL PRH,
PO_REQUISITION_LINES_ALL
PRL,
po_req_distributions_all
rd,
po_headers_all ph,
po_distributions_all d
WHERE 1 = 1
AND PRH.REQUISITION_HEADER_ID = PRL.REQUISITION_HEADER_ID
--AND PRH.SEGMENT1
= OOH.ORIG_SYS_DOCUMENT_REF
AND PRH.REQUISITION_HEADER_ID = OOH.SOURCE_DOCUMENT_ID
AND ORDER_NUMBER
= '344444' --Sales Order Number
AND PRH.SEGMENT1
= 'WE23333' -- Requisition Number
AND rd.requisition_line_id = PRL.requisition_line_id
AND d.req_distribution_id = rd.distribution_id
and ph.po_header_id = d.po_header_id
link between PO Requisition and oe_order_headers_all
SELECT OOH.ORDER_NUMBER SO,
PRH.SEGMENT1 REQ
FROM OE_ORDER_HEADERS_ALL OOH,
PO_REQUISITION_HEADERS_ALL PRH,
PO_REQUISITION_LINES_ALL
PRL
WHERE 1 = 1
AND PRH.REQUISITION_HEADER_ID = PRL.REQUISITION_HEADER_ID
--AND PRH.SEGMENT1
= OOH.ORIG_SYS_DOCUMENT_REF
AND PRH.REQUISITION_HEADER_ID = OOH.SOURCE_DOCUMENT_ID
AND ORDER_NUMBER
= '344444' --Sales Order Number
AND PRH.SEGMENT1
= 'WE23333' -- Requisition Number
AND PRH.TYPE_LOOKUP_CODE
= 'INTERNAL'
join between rcv_shipment_lines and oe_order_lines_all
join between rcv_shipment_headers and
oe_order_headers_all
SELECT OOH.ORDER_NUMBER
SO,
PRH.SEGMENT1 REQ,
ph.segment1 "PO
Num",
rsh.RECEIPT_NUM
"RECEIPT_NUM"
FROM OE_ORDER_HEADERS_ALL OOH,
PO_REQUISITION_HEADERS_ALL PRH,
PO_REQUISITION_LINES_ALL
PRL,
po_req_distributions_all
rd,
po_headers_all ph,
po_distributions_all d,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
WHERE 1 = 1
AND PRH.REQUISITION_HEADER_ID = PRL.REQUISITION_HEADER_ID
--AND PRH.SEGMENT1
= OOH.ORIG_SYS_DOCUMENT_REF
AND PRH.REQUISITION_HEADER_ID = OOH.SOURCE_DOCUMENT_ID
AND ORDER_NUMBER
= '344444' --Sales Order Number
AND PRH.SEGMENT1
= 'WE23333' -- Requisition Number
AND rd.requisition_line_id = PRL.requisition_line_id
AND d.req_distribution_id = rd.distribution_id
and ph.po_header_id = d.po_header_id
and ph.PO_HEADER_ID=rsl.PO_HEADER_ID
and rsl.shipment_header_id=rsh.shipment_header_id
0 comments:
Post a Comment