Search Results ap_history_invoices_all




Overview

The AP_HISTORY_INVOICES_ALL table is a core data retention object within the Oracle E-Business Suite Payables (AP) module. It functions as a historical summary repository for invoice header information that has been purged from the primary transactional tables, such as AP_INVOICES_ALL, through the Payables Purge process. Its primary role is to preserve a critical, auditable subset of invoice data for compliance and historical reporting long after the detailed transactional records have been archived or deleted, thereby balancing database performance with regulatory and business record-keeping requirements.

Key Information Stored

The table stores summarized attributes of purged invoices, centering on the unique INVOICE_ID as its primary key. While the specific column list is not fully detailed in the provided metadata, the foreign key relationships indicate it holds essential identifiers and context. Key fields logically include the PURGE_NAME, which links the record to a specific execution of the financial purge process documented in FINANCIALS_PURGES, and the DOC_SEQUENCE_ID, which references the document sequencing setup in FND_DOCUMENT_SEQUENCES. Other typical summary data would encompass invoice number, vendor details, invoice amount, payment status, and dates, but in a condensed format compared to the original transactional invoice tables.

Common Use Cases and Queries

The primary use case is historical inquiry and audit reporting on purged Payables transactions. Analysts or auditors can query this table to verify the existence of invoices processed in prior fiscal periods or to generate high-level summaries. A common query pattern involves joining to related history tables to reconstruct payment information. For example, to list purged invoices and their associated purge batch, one might use: SELECT ahi.invoice_id, ahi.invoice_num, fp.purge_name, fp.purge_date FROM ap_history_invoices_all ahi, financials_purges fp WHERE ahi.purge_name = fp.purge_name;. Another critical scenario is tracing document sequence usage over time for audit trails by joining to FND_DOCUMENT_SEQUENCES on DOC_SEQUENCE_ID.

Related Objects

The table maintains defined relationships with several other EBS objects, as per the provided metadata. Its primary key (INVOICE_ID) is referenced by the child table AP_HISTORY_INV_PAYMENTS_ALL, which stores summarized payment records for the purged invoice. It has foreign key dependencies to two master tables: it references the FINANCIALS_PURGES table via the PURGE_NAME column to track which purge process removed the invoice, and the FND_DOCUMENT_SEQUENCES table via the DOC_SEQUENCE_ID column to maintain the document sequencing context. These relationships are essential for maintaining data integrity and enabling comprehensive historical joins.