Search Results ap_selected_invoices_all




Overview

The AP_SELECTED_INVOICES_ALL table is a core transactional table within the Oracle E-Business Suite Payables module (AP). Its primary function is to serve as a temporary staging area for invoice payment processing. Specifically, it stores a snapshot of all invoices that have been successfully selected for inclusion in a payment batch, also known as a check run. This table is critical for the interim state between invoice selection and the final generation of payments, holding the working data that defines the composition of a payment batch before checks or electronic payments are formally created and issued.

Key Information Stored

The table's structure captures the essential links between a payment batch and the specific invoices slated for payment. Its primary key is a composite of CHECKRUN_NAME, INVOICE_ID, and PAYMENT_NUM, ensuring uniqueness for each invoice line selected within a run. Key columns, as indicated by its foreign key relationships, include CHECKRUN_NAME (linking to AP_INV_SELECTION_CRITERIA_ALL), INVOICE_ID (linking to AP_INVOICES_ALL), and VENDOR_ID and VENDOR_SITE_ID (linking to PO_VENDORS and PO_VENDOR_SITES_ALL). It also stores critical financial identifiers such as SET_OF_BOOKS_ID (linking to GL_SETS_OF_BOOKS_11I) and AP_CCID (the Payables liability account code combination ID, linking to GL_CODE_COMBINATIONS). Additional columns like PAY_SELECTED_CHECK_ID and PRINT_SELECTED_CHECK_ID link to the AP_SELECTED_INVOICE_CHECKS_ALL table, tracking the payment instrument details.

Common Use Cases and Queries

The primary use case is troubleshooting and reporting on the contents of a payment batch before or after payment formatting. Common queries involve joining to core Payables and supplier tables to analyze selected invoices. For example, to list all invoices selected in a specific payment batch with vendor details:

  • SELECT asi.checkrun_name, aia.invoice_num, pv.vendor_name, asi.invoice_amount FROM ap_selected_invoices_all asi JOIN ap_invoices_all aia ON asi.invoice_id = aia.invoice_id JOIN po_vendors pv ON asi.vendor_id = pv.vendor_id WHERE asi.checkrun_name = '&CHECKRUN_NAME';

Another critical use is identifying invoices that were selected but for which payment creation failed or was canceled, by checking for records where PAY_SELECTED_CHECK_ID is NULL for a given CHECKRUN_NAME. Data in this table is typically transient; records are purged upon the successful completion and finalization of the payment batch.

Related Objects

AP_SELECTED_INVOICES_ALL has extensive dependencies, as shown by its foreign keys. It is centrally linked to the invoice header (AP_INVOICES_ALL) and the payment batch definition (AP_INV_SELECTION_CRITERIA_ALL). Its relationship to PO_VENDORS and PO_VENDOR_SITES_ALL provides supplier context. The link to AP_SELECTED_INVOICE_CHECKS_ALL is vital for connecting selected invoices to the generated payment instructions. Furthermore, its ties to GL_SETS_OF_BOOKS_11I and GL_CODE_COMBINATIONS anchor the payment data to the general ledger. These relationships make it a key hub for data during the payment batch lifecycle.