SELECT prha.segment1 requisition_number,
prha.type_lookup_code,
prha.authorization_status,
prla.item_description,
prla.quantity,
pha.type_lookup_code,
pha.segment1 po_number,
pha.document_creation_method,
pla.item_id,pla.list_price_per_unit,rsh.receipt_num
FROM po_requisition_headers_all prha,--REQUISITION HEADERS TABLE
po_requisition_lines_all prla,--REQUISITIONS LINES TABLE
po_req_distributions_all prda,--REQUISITIONS DISTRIBUTION TABLE
po_headers_all pha, --PURCHASE ORDER HEADER TABLE
po_lines_all pla,--PURCHASE ORDER LINE TABLE
po_distributions_all pda,--PURCHASE ORDER DISTRIBUTIONS TABLE
rcv_shipment_headers rsh,--RECEIPT HEADER TABLE
rcv_shipment_lines rsl--RECEIPT LINE TABLE
WHERE prha.requisition_header_id = prla.requisition_header_id
and prla.requisition_line_id = prda.requisition_line_id
and pha.po_header_id = pla.po_header_id
and pla.po_line_id = pda.po_line_id
and prda.distribution_id = pda.req_distribution_id
and rsh.shipment_header_id = rsl.shipment_header_id
and pha.po_header_id = rsl.po_header_id
--and prha.segment1 = '336276';
and rsh.shipment_header_id = '23163104';
prha.type_lookup_code,
prha.authorization_status,
prla.item_description,
prla.quantity,
pha.type_lookup_code,
pha.segment1 po_number,
pha.document_creation_method,
pla.item_id,pla.list_price_per_unit,rsh.receipt_num
FROM po_requisition_headers_all prha,--REQUISITION HEADERS TABLE
po_requisition_lines_all prla,--REQUISITIONS LINES TABLE
po_req_distributions_all prda,--REQUISITIONS DISTRIBUTION TABLE
po_headers_all pha, --PURCHASE ORDER HEADER TABLE
po_lines_all pla,--PURCHASE ORDER LINE TABLE
po_distributions_all pda,--PURCHASE ORDER DISTRIBUTIONS TABLE
rcv_shipment_headers rsh,--RECEIPT HEADER TABLE
rcv_shipment_lines rsl--RECEIPT LINE TABLE
WHERE prha.requisition_header_id = prla.requisition_header_id
and prla.requisition_line_id = prda.requisition_line_id
and pha.po_header_id = pla.po_header_id
and pla.po_line_id = pda.po_line_id
and prda.distribution_id = pda.req_distribution_id
and rsh.shipment_header_id = rsl.shipment_header_id
and pha.po_header_id = rsl.po_header_id
--and prha.segment1 = '336276';
and rsh.shipment_header_id = '23163104';
No comments:
Post a Comment