select ROWNUM "SL NO",
prha.segment1 "PR NO",
prha.creation_date "PR CREATION DATE",
prha.approved_date "PR APPROVAL DATE",
msib.inventory_item_id "MATERIAL CODE",
msib.description "MATERIAL DESCRIPTION",
prla.quantity "QTY",
prla.unit_meas_lookup_code "UOM" ,
prla.unit_price "UNIT_VALUE",
(prla.quantity*prla.unit_price) "TOTAL VALUE",
plla.need_by_date,
papf.full_name "REQUESTOR",
pha.vendor_site_id "REQUESTOR AT SITE"
FROM po_requisition_headers_all prha,
po_requisition_lines_all prla,
po_req_distributions_all prda,
po_distributions_all pda,
mtl_system_items_b msib,
po_headers_all pha,
po_line_locations_all plla,
per_all_people_f papf,
hr_operating_units hou
WHERE prha.requisition_header_id=prla.requisition_header_id
AND prla.requisition_line_id=prda.requisition_line_id
AND prda.distribution_id=pda.req_distribution_id
AND pda.po_header_id=pha.po_header_id
AND prla.item_id=msib.inventory_item_id
AND msib.organization_id=prha.org_id
AND pha.po_header_id=plla.po_header_id
AND pha.agent_id=papf.person_id
AND hou.name=:Operating_Unit
AND TRUNC(prha.creation_date) BETWEEN NVL(:From_Creation_Date,to_date
(prha.creation_date,'DD-MON-RR')) AND NVL(:To_Creation_Date,to_date
(prha.creation_date,'DD-MON-RR'))
AND msib.inventory_item_id BETWEEN NVL (:From_Material_Code,msib.inventory_item_id)
AND NVL (:To_Material_code, msib.inventory_item_id)
AND papf.full_name=:Requestor
prha.segment1 "PR NO",
prha.creation_date "PR CREATION DATE",
prha.approved_date "PR APPROVAL DATE",
msib.inventory_item_id "MATERIAL CODE",
msib.description "MATERIAL DESCRIPTION",
prla.quantity "QTY",
prla.unit_meas_lookup_code "UOM" ,
prla.unit_price "UNIT_VALUE",
(prla.quantity*prla.unit_price) "TOTAL VALUE",
plla.need_by_date,
papf.full_name "REQUESTOR",
pha.vendor_site_id "REQUESTOR AT SITE"
FROM po_requisition_headers_all prha,
po_requisition_lines_all prla,
po_req_distributions_all prda,
po_distributions_all pda,
mtl_system_items_b msib,
po_headers_all pha,
po_line_locations_all plla,
per_all_people_f papf,
hr_operating_units hou
WHERE prha.requisition_header_id=prla.requisition_header_id
AND prla.requisition_line_id=prda.requisition_line_id
AND prda.distribution_id=pda.req_distribution_id
AND pda.po_header_id=pha.po_header_id
AND prla.item_id=msib.inventory_item_id
AND msib.organization_id=prha.org_id
AND pha.po_header_id=plla.po_header_id
AND pha.agent_id=papf.person_id
AND hou.name=:Operating_Unit
AND TRUNC(prha.creation_date) BETWEEN NVL(:From_Creation_Date,to_date
(prha.creation_date,'DD-MON-RR')) AND NVL(:To_Creation_Date,to_date
(prha.creation_date,'DD-MON-RR'))
AND msib.inventory_item_id BETWEEN NVL (:From_Material_Code,msib.inventory_item_id)
AND NVL (:To_Material_code, msib.inventory_item_id)
AND papf.full_name=:Requestor
No comments:
Post a Comment