Search Results do_rounding




Overview

AP_ACCTG_PAY_ROUND_PKG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. Its business purpose is to support the Payables accounting subsystem in validating and reconciling the amounts that flow into payment and prepayment accounting entries. Payment accounting in Payables is built from distributions, withholding, prepayment applications, and cash clearing amounts, any of which can be affected by rounding, currency conversion, or threshold differences. This package produces and compares the rounded totals that the accounting engine uses to determine whether a set of payment distributions balances before the corresponding subledger journal entries are created and transferred to XLA and the General Ledger.

The package is classified as an OTHER API in the ETRM repository and is not intended as a public integration interface. It is tightly coupled to the payables accounting packages AP_ACCOUNTING_PAY_PKG, AP_ACCTG_PAY_DIST_PKG, and AP_ACCTG_PREPAY_DIST_PKG, which call it during the accounting generation cycle for payments, prepayments, and prepayment applications. Its role is best understood as an internal calculation and reconciliation utility rather than a user-facing program.

Key Procedures and Functions

The ETRM metadata documents seven procedures and functions within the package:

  • DO_ROUNDING — Performs the rounding logic applied to payment-related accounting amounts, ensuring that calculated values conform to the precision and currency rules used by the accounting engine.
  • TOTAL_PAY — Aggregates or totals the payment amounts under consideration for a given payment or accounting event.
  • FINAL_PAY — Derives or returns the final payment amount after rounding and totalling, representing the value used for the payment-side accounting entry.
  • COMPARE_PAY — Compares the computed payment totals against the expected or source amounts to detect discrepancies, typically as part of balancing validation before accounting is finalized.
  • TOTAL_APPL — Totals the application amounts, such as prepayment applications or applied distributions, related to the payment being accounted.
  • FINAL_APPL — Derives the final applied amount after totalling and rounding for the application side of the accounting entry.
  • FINAL_CASH — Determines the final cash amount, supporting the reconciliation of the cash clearing or cash line generated when a payment is accounted.

Tables Accessed

The package operates against a set of core Payables and Subledger Accounting tables via APPS synonyms. AP_CHECKS_ALL, AP_INVOICE_PAYMENTS_ALL, AP_PAYMENT_HISTORY, AP_PAYMENT_HISTORY_ALL, and AP_PAYMENT_HIST_DISTS supply the payment, payment history, and payment distribution records that define the amounts to be rounded and reconciled. AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, and AP_PREPAY_APP_DISTS provide the invoice and prepayment application context required when payments settle or apply to invoices and prepayments. AP_PREPAY_HISTORY_ALL supports prepayment application accounting. AP_SYSTEM_PARAMETERS_ALL and FINANCIALS_SYSTEM_PARAMS_ALL supply system-level setup that influences rounding and accounting behaviour, including currency precision and ledger-related parameters. XLA_EVENTS is consulted in relation to the subledger accounting events for which journal entries are generated, and FND_LOG_MESSAGES is used for diagnostic logging when rounding or balancing discrepancies are detected.

Usage Notes

AP_ACCTG_PAY_ROUND_PKG is invoked internally by the Payables accounting packages rather than being called directly from Oracle Forms or from a standalone concurrent program. The ETRM dependency data shows that AP_ACCTG_PAY_DIST_PKG and AP_ACCTG_PREPAY_DIST_PKG both reference it, and the package additionally references AP_ACCOUNTING_PAY_PKG, indicating that it participates in the accounting generation path triggered by Payables processes such as Payables Accounting and payment accounting creation. Because the package has no documented public parameters and is classified as OTHER, it should not be treated as a supported integration API; customizations that require rounding or reconciliation of payment accounting amounts should normally call the documented accounting APIs such as AP_ACCOUNTING_PAY_PKG instead. When diagnosing rounding or balancing errors in payment accounting, the FND_LOG_MESSAGES entries written by this package and the dependent packages provide the principal troubleshooting evidence in both 12.1.1 and 12.2.2.