SELECT ood.organization_name ,
hou.name ,
prha.attribute1 "BOQ NO" ,
-- ppa.name "PR NAME" ,
prda.project_id "PROJECT NO" ,
prha.segment1 "PR NO" ,
mtl.segment1 ITEM ,
mtl.DESCRIPTION ,
prla.unit_meas_lookup_code UOM ,
prla.quantity "PR QTY" ,
prla.unit_price "PR PRICE" ,
poh.segment1 "PO NO" ,
pol.quantity "PO QTY" ,
pol.unit_price "PO PRICE" ,
poh.revision_num "PO REV" ,
paa.quantity "PO AMMENDED QTY" ,
paa.unit_price "PO AMMENDED PRICE",
rt.quantity "RECEIPT QTY" ,
rt.quantity_billed "INVOICE QTY"
from
po_requisition_headers_all prha,
po_requisition_lines_all prla,
po_req_distributions_all prda ,
po_headers_all poh,
po_lines_all pol,
po_distributions_all pod,
po_lines_archive_all paa,
rcv_transactions rt,
rcv_shipment_lines rcl,
org_organization_definitions ood,
hr_operating_units hou,
mtl_system_items_b mtl
where
prha.requisition_header_id = prla.requisition_header_id
and prla.requisition_line_id = prda.requisition_line_id
and prda.Distribution_id = pod.req_Distribution_id
and poh.po_header_id = pol.po_header_id
and poh.po_header_id = pod.po_header_id
and paa.po_header_id(+) = poh.po_header_id
and rt.shipment_line_id = rcl.shipment_line_id
and ood.operating_unit=hou.organization_id
and rcl.po_distribution_id= pod.req_distribution_id
AND hou.organization_id(+) = prha.org_id
AND prha.org_id =poh.org_id
AND mtl.inventory_item_id=prla.item_id
AND ood.organization_id =mtl.organization_id
and rt.transaction_type ='RECEIVE'
and prha.segment1='400143'
and ood.organization_id = 86
No comments:
Post a Comment