Search Results ap_invoice_pkg




Overview

APPS.AP_INVOICES_PKG is the core PL/SQL package body that encapsulates the transaction-level logic for Oracle Payables invoices in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It is the packaged implementation behind the AP_INVOICES base table and its _ALL partitioned counterpart, providing the row-level operations, validations, and derived-attribute lookups that the Invoice Workbench and the Payables application programming interfaces depend upon. The package is classified as an "OTHER" API in the ETRM repository and holds a VALID status in the APPS schema. It sits at the center of the Payables object dependency graph, invoking sibling packages such as AP_INVOICES_UTILITY_PKG, AP_INVOICES_POST_PROCESS_PKG, AP_AI_TABLE_HANDLER_PKG, AP_ETAX_SERVICES_PKG, AP_UTILITIES_PKG, and GL_CA_UTILITY_PKG, and publishing invoice events through XLA_EVENTS_PUB_PKG. It is referenced by 60 other database objects, confirming its role as a foundational dependency rather than a terminal application entry point.

Key Procedures and Functions

The documented interface exposes 50 procedures and functions, of which the following are representative:

These routines are declarative in nature: they expose invoice state and validation outcomes to callers without requiring the caller to query the underlying tables directly.

Tables Accessed

The package reads and writes the principal Payables invoice tables through APPS synonyms: AP_INVOICES and AP_INVOICES_ALL (invoice headers), AP_INVOICE_LINES and AP_INVOICE_LINES_ALL (invoice lines), AP_INVOICE_DISTRIBUTIONS and AP_INVOICE_DISTRIBUTIONS_ALL (accounting distributions), AP_PAYMENT_SCHEDULES_ALL (payment terms and scheduled payments), and AP_SELF_ASSESSED_TAX_DIST_ALL (self-assessed tax distributions). Supplier validation draws on AP_SUPPLIERS and AP_SUPPLIER_SITES_ALL. System behavior is governed by AP_SYSTEM_PARAMETERS_ALL and FINANCIALS_SYSTEM_PARAMS_ALL, while accounting period validation uses GL_PERIOD_STATUSES. Payment integration is supported through IBY_DOCS_PAYABLE_GT and IBY_TRANSACTION_ERRORS_GT, which bridge to the IBY_DISBURSEMENT_COMP_PUB payments layer. The inclusion of MO_GLOBAL, RCV_SHIPMENT_HEADERS, PA_AP_INTEGRATION, and XLA_EVENTS_PUB_PKG reflects cross-module integration with inventory, receiving, projects, and subledger accounting.

Usage Notes

AP_INVOICES_PKG is invoked primarily from the Oracle Payables Invoice Workbench forms (APXINWKB) and from concurrent programs that process invoices, holds, and accounting events. Custom code and extensions typically call the getter functions rather than the DML routines, because direct inserts through INSERT_ROW bypass higher-level validation performed by the public AP_INVOICE_PUB API. The package depends on AP_INVOICE_PUB and FND_MSG_PUB for error propagation and on MO_GLOBAL for multi-org security context, so callers must ensure a valid operating unit is initialized before invocation. Because the package is not referenced by any database object itself, it functions as a leaf-level implementation dependency; Oracle recommends that customizations target the supported public APIs rather than this internal package body.