Search Results ap_pay_invoice_pkg




Overview

APPS.AP_PAY_INVOICE_PKG is a core Payables package in Oracle E-Business Suite 12.1.1 and 12.2.2 that encapsulates the logic used to apply payments against invoices and to keep the related invoice, payment schedule, and payment records synchronized. Its principal business function is to perform the "pay in full" and partial payment operations that occur when a user creates a payment, when a prepayment is applied, or when interest invoices are generated against overdue balances.

The package is a foundational dependency within the Payables module. ETRM documents it as VALID in the APPS schema with an API classification of OTHER, meaning it is an internal, non-publicly-supported API rather than a formally published interface. It exposes six documented procedures and relies on standard Oracle database packages such as STANDARD, and it is referenced by five other Payables packages, confirming its role as a shared service layer rather than an entry point.

Key Procedures and Functions

The documented program units are:

  • AP_PAY_INVOICE — The primary driver procedure that applies a payment to an invoice, coordinating the subsequent updates to invoice, schedule, and payment records.
  • AP_PAY_INSERT_INVOICE_PAYMENTS — Inserts the invoice-to-payment association rows that record how a payment amount is distributed across invoices.
  • AP_PAY_UPDATE_AP_INVOICES — Updates AP_INVOICES to reflect paid amounts and the resulting payment status of the invoice.
  • AP_PAY_UPDATE_PAYMENT_SCHEDULE — Updates the payment schedule rows to record amounts paid and remaining balances on each scheduled installment.
  • AP_PAY_UPDATE_CHECK_AMOUNT — Maintains the amount recorded on the associated payment document (AP_CHECKS) as payments are applied.
  • AP_INV_PAY_UPDATE_INVOICES — Performs the consolidated invoice-level update step used after the payment detail records have been written.

ETRM does not publish parameter lists for these procedures, and they should therefore be treated as internal interfaces. Names and purposes are documented; signatures are not part of the supported contract.

Tables Accessed

The package reads and writes the principal Payables payment and invoice tables through APPS synonyms:

  • AP_INVOICES — the invoice header, updated for paid amount and payment status.
  • AP_INVOICE_DISTRIBUTIONS — invoice distribution lines affected by payment application.
  • AP_INVOICE_PAYMENTS — the association between invoices and payments, inserted by AP_PAY_INSERT_INVOICE_PAYMENTS.
  • AP_PAYMENT_SCHEDULES / AP_PAYMENT_SCHEDULES_ALL — scheduled installments updated for amounts paid and remaining balances.
  • AP_CHECKS — the payment document, updated for applied and remaining amounts.
  • AP_SYSTEM_PARAMETERS — Payables system options consulted during processing.
  • CE_GL_ACCOUNTS_CCID — account code combinations used in payment accounting.
  • GL_PERIOD_STATUSES — period open/closed status used to validate accounting entries.

Usage Notes

AP_PAY_INVOICE_PKG is invoked indirectly rather than directly. It is referenced by AP_AUTO_PAYMENT_PKG, AP_INTEREST_INVOICE_PKG, AP_PAYMENT_PUBLIC_PKG, AP_PAY_IN_FULL_PKG, and AP_VOID_PKG, which are themselves driven by the Payables payment forms, the AutoPayment concurrent programs, and interest invoice generation. Custom code should call the supported public APIs in these dependent packages rather than calling AP_PAY_INVOICE_PKG directly, since signatures are not documented and are subject to change across 12.1.1 and 12.2.2.