Search Results ap_purge_invoice_list




Overview

The AP_PURGE_INVOICE_LIST table is a temporary data structure within the Oracle E-Business Suite Payables module (AP). Its primary role is to serve as a staging table during the execution of the Payables Invoice Purge process. This process permanently removes fully paid, canceled, or otherwise eligible invoice records from the system to improve performance and manage database growth. The table acts as a secure, intermediate repository, holding the unique identifiers of invoices that have been identified as candidates for deletion before the actual purge transaction is committed. This design ensures data integrity and allows for validation and review prior to final execution.

Key Information Stored

The table's structure is purpose-built for its staging function. Its most critical column is INVOICE_ID, which stores the primary key value (INVOICE_ID) from the AP_INVOICES_ALL table for each invoice selected for purging. This column is also the table's primary key, preventing duplicate invoice IDs within a single purge batch. The second key column is PURGE_NAME, which links the invoice IDs to a specific purge run. This value corresponds to a unique identifier in the FINANCIALS_PURGES control table, which tracks the status and parameters of all purge processes across financial modules. Together, these two columns create a record of which invoices are slated for removal by which specific purge job.

Common Use Cases and Queries

The table is primarily accessed by the standard Payables Invoice Purge concurrent program (APXINPUR). A typical workflow involves the purge program populating the table based on user-defined selection criteria (e.g., invoice date, payment status), then processing the IDs stored within it. Administrators may query the table to audit or verify the scope of a purge before it completes. A common diagnostic query is:

SELECT p.purge_name, p.invoice_id, a.invoice_num
FROM ap_purge_invoice_list p, ap_invoices_all a
WHERE p.invoice_id = a.invoice_id
AND p.purge_name = '&PURGE_RUN_NAME';

This joins the purge list to the main invoices table to see the invoice numbers selected. It is crucial to note that this table is temporary in nature; its data is specific to an active or recent purge run and is not a permanent history.

Related Objects

AP_PURGE_INVOICE_LIST has defined relationships with two core tables, as documented in the ETRM metadata:

  • AP_INVOICES_ALL: The table references AP_INVOICES_ALL via a foreign key on the INVOICE_ID column. This ensures every record in the purge list corresponds to a valid, existing invoice.
  • FINANCIALS_PURGES: The table references FINANCIALS_PURGES via a foreign key on the PURGE_NAME column. This ties the invoice list to a master purge request, providing context and control over the purge job's lifecycle.

The table itself is referenced by the standard purge program logic and is central to the invoice purge architecture in releases 12.1.1 and 12.2.2.