1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Query to get PR and PO Details

Discussion in 'Oracle Apps Technical' started by nilesh.dudhane, Feb 15, 2015.

  1. nilesh.dudhane

    nilesh.dudhane Active Member

    Messages:
    42
    Likes Received:
    2
    Trophy Points:
    135
    Location:
    India
    The following is a Query to get PR and PO Details

    Code (SQL):

    SELECT poh.segment1 po_number, pol.line_num, pol.item_description,
           ploc.quantity, mtl.segment1 || ',' || mtl.segment2 po_item,
           prh.segment1 req_num, fnd.user_name requestor, prl.need_by_date
      FROM po_line_locations_all ploc,
           po_lines_all pol,
           po_headers_all poh,
           mtl_system_items_b mtl,
           po_requisition_lines_all prl,
           po_requisition_headers_all prh,
           fnd_user fnd
     WHERE poh.po_header_id = pol.po_header_id(+)
       AND pol.po_line_id = ploc.po_line_id(+)
       AND pol.item_id = mtl.inventory_item_id(+)
       AND ploc.line_location_id = prl.line_location_id(+)
       AND prl.requisition_header_id = prh.requisition_header_id(+)
       AND prh.preparer_id = fnd.employee_id(+)
       AND mtl.organization_id(+) = :your_org