Search Results ap_doc_sequence_audit




Overview

The AP_DOC_SEQUENCE_AUDIT table is a core data object within the Oracle E-Business Suite Payables (AP) module. Its primary function is to serve as an audit trail and reference repository for the voucher numbers assigned to both invoices and payments. This table is integral to the document sequencing functionality, which ensures that financial documents are numbered in a controlled, sequential, and often gapless manner to meet internal accounting controls and external audit requirements. By logging each assigned sequence value against its originating document sequence definition and assignment, it provides a permanent, non-modifiable record that links a specific voucher number to a specific invoice or payment transaction.

Key Information Stored

The table's structure centers on the relationship between a document sequence definition and the specific value assigned from it. Its primary key is a composite of DOC_SEQUENCE_ID and DOC_SEQUENCE_VALUE, enforcing uniqueness for each voucher number generated. The DOC_SEQUENCE_ID column is a foreign key to FND_DOCUMENT_SEQUENCES, identifying the specific sequencing rule used. The DOC_SEQUENCE_VALUE column stores the actual sequential number (voucher number) assigned. The DOC_SEQUENCE_ASSIGNMENT_ID is a foreign key to FND_DOC_SEQUENCE_ASSIGNMENTS, which defines the application and context (e.g., Payables Invoice, Payables Payment) for which the sequence is used. This combination allows the system to definitively track which number from which sequence was issued for a particular business event.

Common Use Cases and Queries

The primary use case is auditing and troubleshooting voucher number assignments. It is critical for reconciling the sequence of issued numbers and investigating discrepancies, such as missing or duplicate voucher numbers. A common reporting need is to list all voucher numbers assigned within a date range for a specific document sequence. A sample query for this would join to FND_DOCUMENT_SEQUENCES to get the sequence name:

  • SELECT aud.doc_sequence_value, ds.name, aud.last_update_date FROM ap_doc_sequence_audit aud, fnd_document_sequences ds WHERE aud.doc_sequence_id = ds.doc_sequence_id AND ds.name = '<SEQUENCE_NAME>' ORDER BY aud.doc_sequence_value;

Another vital use case is tracing the voucher number for a specific invoice or payment, which typically involves joining the AP_INVOICES_ALL or AP_CHECKS_ALL tables to this audit table using the DOC_SEQUENCE_ID and DOC_SEQUENCE_VALUE columns.

Related Objects

The AP_DOC_SEQUENCE_AUDIT table has defined foreign key relationships with several key EBS objects, as documented in the provided metadata:

  • FND_DOC_SEQUENCE_ASSIGNMENTS: Joined via AP_DOC_SEQUENCE_AUDIT.DOC_SEQUENCE_ASSIGNMENT_ID. This links the audited number to its functional assignment.
  • FND_DOCUMENT_SEQUENCES: Joined via AP_DOC_SEQUENCE_AUDIT.DOC_SEQUENCE_ID. This identifies the master sequence definition.
  • AP_INVOICES_ALL: References the audit table via its columns AP_INVOICES_ALL.DOC_SEQUENCE_ID and AP_INVOICES_ALL.DOC_SEQUENCE_VALUE to find the voucher number for an invoice.
  • AP_CHECKS_ALL: References the audit table via its columns AP_CHECKS_ALL.DOC_SEQUENCE_ID and AP_CHECKS_ALL.DOC_SEQUENCE_VALUE to find the voucher number for a payment.