Sunday 29 December 2013

Po without Invoice Detail In Oracle Apps

/* Formatted on 12/27/2013 4:02:40 PM (QP5 v5.114.809.3010) */
  SELECT   pha.segment1,
            pla.line_num,
           as1.vendor_name,
           ass.vendor_site_code,
           pla.quantity,
           pll.quantity_billed,
           pll.quantity_received
    FROM   po_headers_all pha,
           po_lines_all pla,
           po_line_locations_all pll,
           po_distributions_all pda,
           ap_suppliers as1,
           ap_supplier_sites_all ass
   WHERE       pha.po_header_id = pla.po_header_id
           AND pla.po_line_id = pll.po_line_id
           AND pll.line_location_id = pda.line_location_id
           AND pha.vendor_id = as1.vendor_id
           AND pha.vendor_site_id = ass.vendor_site_id
           AND as1.vendor_id = ass.vendor_id
           AND pha.org_id in(123)
           AND pll.quantity > pll.quantity_billed
           AND pll.quantity = pll.quantity_received                      --> 0
           AND pll.quantity_billed = 0
           AND pha.authorization_status = 'APPROVED'
           AND ROWNUM < 10
--           AND pha.segment1 = '29302'
ORDER BY   pha.creation_date DESC

1 comment:

  1. Can i get a query for PR and PO details which are not yet invoiced.

    ReplyDelete