Results for “ap_batches_pkg”

38 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

AP_BATCHES_PKG is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It provides the underlying database access layer for invoice batches within the Oracle Payables (AP) module. An invoice batch is a grouping mechanism that allows a user to enter, validate, and process a set of invoices as a single unit, applying shared control attributes such as batch name, control count, and control amount. The package encapsulates the create, read, update, and delete operations against the invoice batch tables, together with validation and concurrency control logic that enforces batch integrity. As classified in the ETRM documentation, the object is registered as a component of type OTHER rather than a formal public API, which indicates that it is intended primarily for internal consumption by Oracle Payables forms, workflow, and related packages rather than as a supported extension point for customer code.

Key Procedures and Functions

The documented package metadata lists seven procedures and functions, which together form a conventional table-handler pattern:

  • INSERT_ROW — Creates a new invoice batch record, populating the batch columns and applying the defaulting rules required when a batch is first defined.
  • UPDATE_ROW — Modifies an existing invoice batch record, typically used when batch control information is revised during invoice entry.
  • DELETE_ROW — Removes a batch record, subject to the validation that prevents deletion of batches in an inappropriate state.
  • LOCK_ROW — Acquires a row-level lock on the batch, providing pessimistic concurrency control so that two concurrent sessions cannot modify the same batch simultaneously.
  • CHECK_UNIQUE — Validates the uniqueness of the batch identifier or name, preventing duplicate batch definitions.
  • GET_ACTUAL_INV_COUNT — Returns the actual number of invoices currently associated with the batch, used to compare against the user-entered control count.
  • GET_ACTUAL_INV_AMOUNT — Returns the actual summed invoice amount for the batch, used to compare against the user-entered control amount.

The two GET functions are significant because Oracle Payables performs control total reconciliation: the actual count and amount derived from the invoices are compared against the batch control values to detect discrepancies before the batch is released for approval and payment.

Tables Accessed

The package references two application tables through APPS synonyms:

  • AP_BATCHES_ALL — The primary invoice batch table. It is the target of the insert, update, delete, and lock operations, and is the source of batch control attributes. The _ALL suffix denotes the multi-organization access pattern used throughout Oracle Payables.
  • AP_INVOICES_ALL — The invoice table, read by GET_ACTUAL_INV_COUNT and GET_ACTUAL_INV_AMOUNT to derive the actual batch totals from the invoices assigned to the batch.

The dependency metadata additionally shows references to FND_MESSAGE and APP_EXCEPTION, which are used to raise and translate user-facing error messages, and to the STANDARD package for standard PL/SQL constructs.

Usage Notes

AP_BATCHES_PKG is most commonly invoked indirectly by the Oracle Payables invoice workbench and the Invoice Batches form, where it handles batch entry and maintenance on behalf of the user interface. It is not referenced by any other database object according to the dependency metadata, but it in turn references the tables and message utilities described above. The ETRM metadata records two other packages referencing this package, confirming that it participates in a wider internal call chain within the Payables module. Because the package is classified as OTHER rather than a published API, customizations and extensions should not call it directly; instead, Oracle’s supported interfaces should be used for batch creation and manipulation. Customers requiring custom batch processing are advised to rely on the documented public APIs or on interface tables rather than on this internal table handler.