DBA Data[Home] [Help]

APPS.POS_AP_CHECKS_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 26

         SELECT DISTINCT (ph.clm_document_number||'-'||pr.release_num), ph.po_header_id, pr.po_release_id
           FROM ap_invoice_distributions_all aid,
                po_distributions_all pd,
                po_headers_all ph,
                po_releases_all	pr
          WHERE aid.invoice_id in (select invoice_id
                                   from ap_invoice_payments_all
                                   where check_id = l_check_id)
            AND aid.po_distribution_id = pd.po_distribution_id
            AND pr.po_release_id = pd.po_release_id
            AND ph.po_header_id	= pr.po_header_id
            AND ph.type_lookup_code = 'BLANKET'
          UNION ALL
         SELECT DISTINCT ph.clm_document_number, ph.po_header_id, null
           FROM ap_invoice_distributions_all aid,
                po_distributions_all pd,
                po_headers_all ph
          WHERE aid.invoice_id in (select invoice_id
                                   from ap_invoice_payments_all
                                   where check_id = l_check_id)
            AND aid.po_distribution_id = pd.po_distribution_id
            AND pd.po_header_id     = ph.po_header_id
            AND ph.type_lookup_code = 'STANDARD';
Line: 100

      SELECT distinct ai.invoice_num, ai.invoice_id
      FROM   ap_invoices_all         ai,
             ap_invoice_payments_all aip
      WHERE  aip.check_id   = l_check_id
      AND    aip.invoice_id = ai.invoice_id;