1 Reply Latest reply on Jun 1, 2016 2:59 PM by Bashar.

    PO information query

    1424413

      Below I have one query to find some informations about PO, but unfortunately I am not able to find the approval information, like name of who approved and date of approval, can you help me please?

       

       

       

      SELECT distinct

        poh.segment1 OC_NUMBER,

        pol.unit_price,

        pol.quantity,

        pod.amount_billed valor_oc,

        prh.creation_date DATA_CRIACAO,

        ppx.full_name REQUISITANTE,

        a.amount_paid TOTAL_PAGO,

       

       

        poh.po_header_id,

        poh.type_lookup_code PO_TYPE,

        poh.authorization_status PO_STATUS,

        pov.vendor_name SUPPLIER_NAME,

                PPF.full_name hr_full_name,

              PPF.employee_number emp_no,

        pod.destination_subinventory,

        ppf.full_name Buyer_Name,

        poh.closed_Code

      FROM

       

       

        APPS.PO_HEADERS_ALL poh,

        APPS.PO_LINES_ALL pol,

        APPS.mtl_system_items_b msib,

        APPS.PO_LINE_LOCATIONS_ALL poll,

        APPS.PO_DISTRIBUTIONS_ALL pod,

        APPS.po_vendors pov,

        APPS.po_vendor_sites_All povs,

        APPS.hr_locations_all hrls,

        APPS.hr_locations_all hrlb,

        APPS.per_all_people_f ppf,

        APPS.po_line_types polt,

       

        APPS.po_requisition_headers_all prh,

        APPS.po_requisition_lines_all prl,

        APPS.po_req_distributions_all prd,

        APPS.per_people_x ppx,

        APPS.AP_INVOICES_ALL A,

      APPS.AP_INVOICE_DISTRIBUTIONS_ALL B

       

      WHERE

        1                         =1

      AND polt.line_type_id     = pol.line_type_id

      AND povs.vendor_site_id     = poh.vendor_site_id

      AND pov.vendor_id           = poh.vendor_id

      AND pol.item_id             = msib.inventory_item_id

      --AND msib.organization_id    = 204

      AND poh.po_header_id        = pol.po_header_id

      AND pol.po_line_id          = pod.po_line_id

      AND poll.line_location_id   = pod.line_location_id

      AND poh.ship_to_location_id = hrls.location_id

      AND poh.bill_to_location_id = hrlb.location_id

      AND poh.agent_id            = ppf.person_id

      and a.invoice_id = b.invoice_id

      and b.po_distribution_id = pod. po_distribution_id

      AND prh.requisition_header_id = prl.requisition_header_id

        AND ppx.person_id = prh.preparer_id

         AND prd.requisition_line_id = prl.requisition_line_id

         AND POD.req_distribution_id = prd.distribution_id

         AND prh.type_lookup_code = 'PURCHASE'