Thursday 13 June 2013

Query to find receipts against a PO shipment line

execute fnd_client_info.set_org_context('org_id');


  SELECT   pol.po_header_id,
           pol.po_line_id,
           pll.line_location_id,
           pll.quantity,
           rsh.shipment_header_id,
           rsh.receipt_source_code,
           rsh.vendor_id,
           rsh.vendor_site_id,
           rsh.organization_id,
           rsh.shipment_num,
           rsh.receipt_num,
           rsh.ship_to_location_id,
           rsh.bill_of_lading,
           rsl.shipment_line_id,
           rsl.QUANTITY_SHIPPED,
           rsl.QUANTITY_RECEIVED,
           rct.transaction_type,
           rct.transaction_id,
           DECODE (pol.order_type_lookup_code,
                   'RATE', NVL (rct.amount, 0),
                   'FIXED PRICE', NVL (rct.amount, 0),
                   NVL (rct.source_doc_quantity, 0))
              transaction_qty
    FROM   rcv_transactions rct,
           rcv_shipment_headers rsh,
           rcv_shipment_lines rsl,
           po_lines pol,
           po_line_locations pll
   WHERE       rct.po_line_location_id = 28302               
           AND rct.po_line_location_id = pll.line_location_id
           AND rct.po_line_id = pol.po_line_id
           AND NVL (pol.order_type_lookup_code, 'QUANTITY') NOT IN
                    ('RATE', 'FIXED PRICE')
           AND rct.shipment_line_id = rsl.shipment_line_id
           AND rsl.shipment_header_id = rsh.shipment_header_id
ORDER BY   rct.transaction_id

2 comments:

  1. Hi, Can you help me to find the report containing these info
    Po No., Receipt No., Invoice Voucher No.,Payment Document No., Description, Amount, Currency, Approval Status.

    ReplyDelete
  2. Wow, What an exceptional pronounce. i found this too much informatics. it’s miles what i used to be searching for for. i’d as soon as to area you that absorb keep sharing such kind of data.If realistic, thank you. Türkiye importers

    ReplyDelete