Search Results ap_trial_balance




Overview

The AP_TRIAL_BALANCE table is a denormalized reporting structure within the Oracle Payables (AP) module. It stores summarized information about posted invoices for the accrual set of books, providing a flattened view of invoice distribution and payment data that would otherwise require joining multiple normalized tables. Its purpose is to support trial balance reporting and reconciliation activities by pre-aggregating distribution-level amounts against posted invoices.

From a Data Vault modeling perspective, the heuristic classification for this object is a link table. This is inferred from its foreign key structure, which connects AP_INVOICES_ALL and AP_INVOICE_DISTRIBUTIONS_ALL through the composite business keys INVOICE_ID and DISTRIBUTION_LINE_NUMBER. In a Data Vault design, this table would function as a transactional link capturing the relationship between an invoice header and its distribution lines, with descriptive satellite attributes such as amounts and accounting dates.

Key Information Stored

The table contains five documented columns in the ETRM 12.2.2 physical schema. The primary key, AP_TRIAL_BALANCE_PK, is a composite surrogate key comprising INVOICE_ID and DISTRIBUTION_LINE_NUMBER. These two columns also serve as the business-key candidates, as they uniquely identify each row and carry the foreign key relationships to the underlying invoice and distribution tables.

  • INVOICE_ID — The unique identifier of the posted invoice. This column participates in both foreign key relationships, referencing AP_INVOICES_ALL.INVOICE_ID and AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID.
  • DISTRIBUTION_LINE_NUMBER — The line number identifying the specific distribution within the invoice. Combined with INVOICE_ID, it forms the composite primary key.
  • ACCOUNTING_DATE — The GL accounting date associated with the posted invoice, used to determine the accounting period for trial balance reporting.
  • PAYMENT_AMOUNT — The payment amount applied against the invoice, supporting cash-basis or accrual reconciliation.
  • DISTRIBUTION_AMOUNT — The distribution-level amount for the invoice line, representing the actual expense or liability posted to the accrual set of books.

Common Use Cases and Queries

The primary use case is generating trial balance extracts for the accrual set of books without joining the full normalized invoice and distribution tables. Typical scenarios include period-end reconciliation, audit preparation, and accrual reporting.

A representative query retrieving distribution amounts by accounting period:

  • SELECT INVOICE_ID, DISTRIBUTION_LINE_NUMBER, ACCOUNTING_DATE, DISTRIBUTION_AMOUNT, PAYMENT_AMOUNT FROM AP.AP_TRIAL_BALANCE WHERE ACCOUNTING_DATE BETWEEN :start_date AND :end_date ORDER BY ACCOUNTING_DATE, INVOICE_ID;

Aggregating payment versus distribution amounts to identify variances:

  • SELECT INVOICE_ID, SUM(DISTRIBUTION_AMOUNT) total_dist, SUM(PAYMENT_AMOUNT) total_paid FROM AP.AP_TRIAL_BALANCE GROUP BY INVOICE_ID HAVING SUM(DISTRIBUTION_AMOUNT) != SUM(PAYMENT_AMOUNT);

Joining back to AP_INVOICES_ALL for vendor and invoice number context:

  • SELECT ai.INVOICE_NUM, ai.VENDOR_ID, tb.ACCOUNTING_DATE, tb.DISTRIBUTION_AMOUNT FROM AP.AP_TRIAL_BALANCE tb JOIN AP.AP_INVOICES_ALL ai ON tb.INVOICE_ID = ai.INVOICE_ID;

Related Objects

The following objects are most significant to AP_TRIAL_BALANCE based on the documented foreign key relationships and module context:

  • AP_INVOICES_ALL — Referenced via AP_TRIAL_BALANCE.INVOICE_ID = AP_INVOICES_ALL.INVOICE_ID; provides invoice header attributes such as vendor, invoice number, and invoice date.
  • AP_INVOICE_DISTRIBUTIONS_ALL — Referenced via the composite key INVOICE_ID and DISTRIBUTION_LINE_NUMBER; provides distribution detail including accounting flexfield and line amounts.
  • AP_INVOICE_PAYMENTS_ALL — Related through INVOICE_ID to reconcile payment activity reflected in PAYMENT_AMOUNT.
  • AP_PAYMENT_SCHEDULES_ALL — Provides scheduled payment information that aligns with trial balance payment amounts.
  • GL_JE_LINES — The General Ledger journal lines generated from posted invoice distributions, useful for cross-validating trial balance figures against GL balances.
  • AP_ACCOUNTING_EVENTS_ALL — Links accounting events to invoices, supporting audit and period-close reconciliation.

These relationships make AP_TRIAL_BALANCE a practical anchor for Payables accrual reporting and reconciliation workflows in Oracle EBS 12.1.1 and 12.2.2.