Search Results pay_dist_insert
Overview
The APPS.AP_ACCTG_PAY_DIST_PKG package body is a core Oracle Payables accounting engine responsible for creating, adjusting, cascading, and reversing the accounting distributions associated with payment transactions. In Oracle E-Business Suite 12.1.1 and 12.2.2, it supports the Subledger Accounting (SLA) architecture by building rows that feed the XLA (Subledger Accounting) tables, while also maintaining the legacy payment history distribution table AP_PAYMENT_HIST_DISTS. The package translates payment activity — check issuance, invoice payment adjustments, discounts, exchange rate variances, error charges, and cancellations — into balanced, currency-aware accounting lines. Because it is tightly coupled to AP_ACCOUNTING_PAY_PKG, AP_ACCTG_PAY_ROUND_PKG, and the GL_CURRENCY_API, it is the principal mechanism through which Payables delivers payment-related journal entries to the general ledger. The primary view used for querying this data, AP_PAYMENT_HIST_DISTS_S, corresponds to the table of the same name referenced by this package, which explains why a search for "ap_payment_hist_dists_s" surfaces this object.
Key Procedures and Functions
The package exposes eleven documented procedures, each addressing a distinct payment accounting scenario:
- PRIMARY_PAY_EVENTS — Builds the primary accounting distributions when a payment is issued against one or more invoices, creating the base distribution rows for the payment event.
- MANUAL_PAY_ADJ_EVENTS — Handles accounting for manually entered payment adjustments, such as those entered by a user through the Payments window.
- CANCEL_PRIMARY_PAY_EVENTS — Reverses or negates the distributions created by PRIMARY_PAY_EVENTS when a payment is voided or cancelled.
- PAY_DIST_CASCADE_ADJ_EVENTS — Propagates adjustment events across related distributions, ensuring downstream lines remain consistent.
- PAY_DIST_PROC — The main processing driver that orchestrates distribution creation for a payment event.
- PAY_DIST_DISCOUNT — Accounts for discounts taken at the time of payment.
- PAY_DIST_ERV — Accounts for exchange rate variance (ERV) arising from differences between invoice and payment exchange rates.
- PAY_DIST_ERR_CHRG — Accounts for error charges, such as bank or supplier-related charges incurred during payment.
- PAY_DIST_REVERSE — Reverses previously created payment distributions for adjustment or correction scenarios.
- PAY_DIST_INSERT — Performs the physical insert of distribution rows into the history distribution table and associated XLA structures.
- UPG_DIST_LINKS_INSERT — Inserts distribution links, supporting upgrade and migration of distribution relationships, including via XLA_TRANSACTION_ENTITIES_UPG.
Tables Accessed
The package reads and writes a well-defined set of Payables and Subledger Accounting tables. Payment header and line data are sourced from AP_CHECKS_ALL, AP_PAYMENT_HISTORY_ALL, AP_INVOICES_ALL, AP_INVOICE_PAYMENTS_ALL, and AP_INVOICE_DISTRIBUTIONS_ALL. Distribution results are written to AP_PAYMENT_HIST_DISTS (the base table behind the AP_PAYMENT_HIST_DISTS_S view) and to the XLA tables XLA_AE_HEADERS, XLA_AE_LINES, XLA_EVENTS, XLA_DISTRIBUTION_LINKS, and XLA_TRANSACTION_ENTITIES_UPG. Currency conversion draws on FND_CURRENCIES and GL_CURRENCY_API, while system behavior is governed by AP_SYSTEM_PARAMETERS_ALL and FINANCIALS_SYSTEM_PARAMS_ALL. Additional sources include AP_INV_DISTS_SOURCE, AP_MC_INVOICE_DISTS (multi-currency invoice distributions), PO_DISTRIBUTIONS_ALL, and RCV_TRANSACTIONS. Auditing and diagnostics use FND_LOG, FND_LOG_MESSAGES, FND_MESSAGE, FND_GLOBAL, and APP_EXCEPTION.
Usage Notes
AP_ACCTG_PAY_DIST_PKG is invoked by the Payables accounting processes rather than by end users directly. It is called during payment creation, payment adjustment, void and cancellation, and by concurrent programs such as Payables Accounting Process and the payment accounting generator. In R12 SLA environments, its output populates the XLA event and accounting entry tables that produce final journal entries, while AP_PAYMENT_HIST_DISTS_S provides a queryable reporting view. Because the package is referenced by three other packages and itself depends on AP_ACCOUNTING_PAY_PKG and AP_ACCTG_PAY_ROUND_PKG, customizations should avoid direct modification; extensions are better achieved through the documented public entry points or through SLA custom accounting rules. The status of the object is VALID in the APPS schema.
-
APPS.AP_ACCTG_PAY_DIST_PKG SQL Statements
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG SQL Statements
12.2.2
-
PACKAGE BODY: APPS.AP_ACCTG_PAY_DIST_PKG
12.1.1
-
PACKAGE: APPS.AP_ACCTG_PAY_DIST_PKG
12.2.2
-
PACKAGE: APPS.AP_ACCTG_PAY_DIST_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_ACCTG_PAY_DIST_PKG
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on AP_PAYMENT_HIST_DISTS
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on AP_PAYMENT_HIST_DISTS
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on APP_EXCEPTION
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on APP_EXCEPTION
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_LOG_MESSAGES
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_LOG_MESSAGES
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on AP_PAYMENT_HIST_DISTS
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on AP_PAYMENT_HIST_DISTS
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_LOG
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_LOG
12.2.2
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_MESSAGE
12.1.1
-
APPS.AP_ACCTG_PAY_DIST_PKG dependencies on FND_MESSAGE
12.2.2