Search Results ap_get_next_payment




Overview

AP_RECURRING_INVOICES_PKG is a packaged PL/SQL unit owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It encapsulates the core business logic used by Oracle Payables to generate recurring invoices from recurring invoice templates. Recurring invoices support periodic, repeating supplier charges — such as rent, leases, subscriptions, and service retainers — that share a common template but must be materialized as individual, auditable invoice records at defined intervals. The package orchestrates the derivation of the correct accounting period, the calculation of payment amounts, and the creation of the invoice, distributions, and associated batch records. Its dependency on MO_GLOBAL ties period and operating unit context to the Multi-Org access control model, consistent with the MOAC architecture introduced in Release 12. The package is classified as OTHER in the ETRM API classification records, indicating that it is an internal application package rather than a formally published public API with a guaranteed external interface.

Key Procedures and Functions

The documented interface exposes four procedures or functions. It is important to note that the precise parameter signatures are not part of the published metadata and should be verified directly against the package specification in the target instance.

  • AP_CREATE_RECURRING_INVOICES — The principal driver routine. It processes recurring invoice records that are due for generation, applies the template attributes, and creates the resulting invoice and invoice line rows. This is the entry point invoked when the recurring invoice generation process executes.
  • AP_GET_NEXT_PERIOD — Determines the next accounting period to be assigned to a recurring invoice, based on the recurrence schedule defined on the template and the status of open or future-enterable periods.
  • AP_GET_NEXT_PAYMENT — Derives the next scheduled payment for the recurring invoice, advancing the payment schedule from the prior occurrence.
  • AP_GET_FIRST_AMOUNT — Returns the initial amount used as the baseline for the recurring invoice, typically the template amount from which subsequent period amounts are derived.

Tables Accessed

The package reads and writes a tightly grouped set of Payables and Oracle General Ledger tables through APPS synonyms. AP_INVOICES_ALL and AP_INVOICES_S hold the invoice headers created for each recurrence, while AP_INVOICE_LINES and AP_INVOICE_LINES_ALL store the corresponding line detail. AP_RECURRING_PAYMENTS_ALL holds the payment schedule attached to the recurring template. AP_BATCHES_ALL and AP_BATCHES_S are used when recurring invoices are grouped into invoice batches. AP_DISTRIBUTION_SETS, AP_TAX_CODES, AP_OTHER_PERIODS, AP_SYSTEM_PARAMETERS, and FINANCIALS_SYSTEM_PARAMETERS supply defaulting and validation data, including distribution set definitions, tax code lookup, and system-level accounting options. FND_CURRENCIES supplies currency definitions for multi-currency recurring templates. GL_PERIOD_STATUSES is consulted to confirm that the target accounting period is open, and FA_BOOK_CONTROLS is referenced in the context of asset-related recurring charges.

Usage Notes

AP_RECURRING_INVOICES_PKG is not referenced by any other package in the documented dependency graph, confirming its position as a top-level internal worker unit rather than a shared utility. In standard Oracle Payables, recurring invoice generation is driven through the recurring invoices form and the associated concurrent program that submits the generation of due invoices. Custom extensions should generally avoid calling AP_CREATE_RECURRING_INVOICES directly unless the calling code fully replicates the initialization and Multi-Org context settings expected by the package, since period resolution depends on MO_GLOBAL and on open GL_PERIOD_STATUSES rows. Because the package is classified as OTHER and is not a published API, its procedures and internal logic are subject to change between patch levels. Implementations that require recurring invoice automation within a specific Release 12 environment should validate behavior in a test instance prior to promotion, and should confirm the package compilation status is VALID after any application of Payables patches.