Sunday, December 13, 2015

Oracle R12 Purchasing – Track Requisition Number using Purchase Order Number:

Oracle R12 Purchasing – Track Requisition Number using Purchase Order Number:

The below query provides the related requisition number against the purchase order number:

Query to track Requisition number against Standard Purchase Order:
select prha.segment1 from po_requisition_headers_all prha, po_requisition_lines_all prla,po_distributions_all pda,  po_req_distributions_all prda, po_headers_all pha
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 pha.type_lookup_code = 'STANDARD'
and pha.segment1 = :p_po_number

Query to track Requisition number against Blanket Purchase Agreement & Release:
select prha.segment1 from po_requisition_headers_all prha, po_requisition_lines_all prla, po_req_distributions_all prda, po_headers_all pha , po_releases_all pra, po_line_locations_all plla, po_distributions_all pda
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 pha.type_lookup_code = 'BLANKET'
and pha.po_header_id = pra.po_header_id
and pra.po_release_id = plla.po_release_id
and prla.line_location_id = plla.line_location_id
and pha.segment1 = :p_po_number
and pra.release_num = :p_po_release_number


1 comment: