Search Results ap_payment_distributions_n1




Overview

AP.AP_PAYMENT_DISTRIBUTIONS_ALL is the Payables payment accounting distributions table in Oracle E-Business Suite 12.1.1 and 12.2.2. It stores the accounting entries generated for each payment line, recording how a payment is distributed between the liability (Accounts Payable) Accounting Flexfield and the cash/clearing Accounting Flexfield. Rows are created by the Payment Workbench, the Payables Open Interface, and the accounting generation process when a payment is accounted. The object carries FND Design Data reference SQLAP.AP_PAYMENT_DISTRIBUTIONS_ALL and holds the status VALID in the AP schema, with application data stored in the APPS_TS_ARCHIVE tablespace. Under the supplied metadata, the object is not a valid Data Vault hub or satellite: it is best modelled as a link table, since it resolves the relationship between a payment (AP_INVOICE_PAYMENTS_ALL) and two General Ledger code combinations, and it is mutable enough to behave as an accounting link rather than a pure transactional hub.

Key Information Stored

The principal business identifier is the composite key (INVOICE_PAYMENT_ID, PAYMENT_LINE_NUMBER), enforced by the unique index AP_PAYMENT_DISTRIBUTIONS_U1 and mirrored by the AP_PAYMENT_DISTRIBUTIONS_PK primary key constraint. This pair is the business-key candidate; INVOICE_PAYMENT_ID is also the foreign key to AP_INVOICE_PAYMENTS_ALL, while PAYMENT_LINE_NUMBER sequences the individual payment distribution lines. LINE_TYPE_LOOKUP_CODE identifies the type of payment distribution (for example, liability or cash/clearing entries). DIST_CODE_COMBINATION_ID holds the accounting flexfield for the payment distribution, and ACCTS_PAY_CODE_COMBINATION_ID holds the liability flexfield, both referencing GL_CODE_COMBINATIONS. AMOUNT and BASE_AMOUNT carry the distribution in payment currency and functional (ledger) currency respectively; INV_CURR_AMOUNT and INV_CURR_BASE_AMOUNT provide the corresponding amounts in the invoice currency. INVOICE_DISTR_LINE_NUMBER links the row back to the originating invoice distribution line. UNBUILT_FLEX and UNBUILT_FLEX_REASON capture an invalid accounting flexfield and the reason it could not be resolved. Standard WHO audit columns (LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE) are present, together with ORG_ID for multi-organization security. In total the documented physical schema contains 18 columns.

Common Use Cases and Queries

The table is used in payment accounting reconciliation, GL transfer audits, and cash-to-liability reporting. A typical pattern retrieves the accounting entries for a payment and joins to GL_CODE_COMBINATIONS for the flexfield concatenation:

  • Balancing a payment: SELECT INVOICE_PAYMENT_ID, PAYMENT_LINE_NUMBER, LINE_TYPE_LOOKUP_CODE, AMOUNT, BASE_AMOUNT FROM AP_PAYMENT_DISTRIBUTIONS_ALL WHERE INVOICE_PAYMENT_ID = :p_payment_id ORDER BY PAYMENT_LINE_NUMBER;
  • Reporting liabilities: join ACCTS_PAY_CODE_COMBINATION_ID to GL_CODE_COMBINATIONS.CODE_COMBINATION_ID to obtain the liability account description.
  • Diagnosing unresolved accounting: filter on UNBUILT_FLEX IS NOT NULL to list distributions whose Accounting Flexfield could not be built, then inspect UNBUILT_FLEX_REASON.
  • Supporting the AP_PAYMENT_DISTRIBUTIONS_N1 index by restricting on DIST_CODE_COMBINATION_ID, and the N2 index by invoice payment and invoice distribution line, for efficient drill-down.

Related Objects

The FK and index metadata identify the most significant related objects:

  • AP.AP_INVOICE_PAYMENTS_ALL — parent payment table, joined on INVOICE_PAYMENT_ID.
  • GL.GL_CODE_COMBINATIONS — joined twice, on DIST_CODE_COMBINATION_ID and ACCTS_PAY_CODE_COMBINATION_ID.
  • AP.AP_INVOICE_DISTRIBUTIONS_ALL — the source invoice distributions, related through INVOICE_DISTR_LINE_NUMBER and the payment relationship.
  • AP.AP_PAYMENT_DISTRIBUTIONS_ALL indexes AP_PAYMENT_DISTRIBUTIONS_U1, _N1, and _N2, which define the supported access paths.
  • AP.AP_PAYMENTS_ALL and AP_PAYMENT_SCHEDULES_ALL, the payment and schedule objects that share INVOICE_PAYMENT_ID lineage.
  • Payables accounting and payment APIs in the SQLAP design data (FND Design Data SQLAP.AP_PAYMENT_DISTRIBUTIONS_ALL), which is the supported path for creating and maintaining rows; direct DML against this table should be avoided as the object is documented for Oracle internal use.