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:
- INSERT_ROW, UPDATE_ROW, DELETE_ROW, LOCK_ROW — the standard Table Handler API quartet for creating, modifying, deleting, and serializing access to invoice header rows in AP_INVOICES and AP_INVOICES_ALL.
- CHECK_UNIQUE, CHECK_UNIQUE_VOUCHER_NUM — uniqueness enforcement routines that guard against duplicate invoice records and duplicate supplier voucher numbers prior to insert or update.
- GET_DISTRIBUTION_TOTAL — returns the aggregated distribution amount associated with an invoice.
- GET_POSTING_STATUS — retrieval function for the accounting posting state of an invoice.
- GET_APPROVAL_STATUS — retrieval function for the approval state of an invoice.
- GET_PO_NUMBER, GET_RELEASE_NUMBER, GET_RECEIPT_NUMBER, GET_PO_NUMBER_LIST — accessors that surface purchase order, release, and receipt references linked to the invoice or its lines.
- GET_AMOUNT_WITHHELD, GET_PREPAID_AMOUNT — monetary accessors returning withholding and prepayment amounts applicable to the invoice.
- GET_NOTES_COUNT, GET_HOLDS_COUNT, GET_SCHED_HOLDS_COUNT — count functions that report the number of invoice notes and the number of header-level and schedule-level holds.
- GET_AMOUNT_HOLD_FLAG, GET_VENDOR_HOLD_FLAG — flag functions indicating whether amount-based or vendor-based holds are in effect.
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.
-
APPS.AP_INVOICES_PKG dependencies on GL_PERIOD_STATUSES
12.1.1
-
APPS.AP_INVOICES_PKG dependencies on GL_PERIOD_STATUSES
12.2.2
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES_PKG
12.1.1
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_INVOICES_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_INVOICES_PKG
12.2.2
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES
12.1.1
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES
12.2.2