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",
pha.segment1 "RFQ NO",
pha.creation_date "RFQ CREATION DATE"
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,
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 hou.organization_id(+)=pha.org_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)
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",
pha.segment1 "RFQ NO",
pha.creation_date "RFQ CREATION DATE"
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,
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 hou.organization_id(+)=pha.org_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)
No comments:
Post a Comment