Search Results gl_alloc_batches_pkg




Overview

GL_ALLOC_BATCHES_PKG is an Oracle EBS General Ledger PL/SQL package that encapsulates the validation, insertion, locking, update, and deletion logic for allocation batch definitions stored in the GL_ALLOC_BATCHES table. Allocation batches group recurring allocation formulas that redistribute balances across accounts, and this package serves as the low-level data access layer that the Allocation Batch definition form and related concurrent programs call to keep that data consistent. The package header (glimabas.pls, version 120.5) dates to Release 10 of the product line, and the code has been carried forward largely unchanged into the 12.1.1 and 12.2.2 releases, where it remains owned by APPS and classified as an OTHER API.

Key Procedures and Functions

  • CHECK_UNIQUE — Verifies that the name supplied for an allocation batch is unique within the given chart of accounts, typically excluding the row identified by a rowid during an update. The user's search term, "check_batch," maps to this kind of batch-name and batch-integrity validation performed before persistence.
  • CHECK_BATCH — Documented as the batch validation routine; it confirms that the batch is in a valid state before dependent processing proceeds. Note that no parameter list is published in the available metadata.
  • GET_UNIQUE_ID — Returns a new unique allocation batch identifier, conventionally sourced from a sequence or the GL_ALLOC_BATCHES_S table, so that callers can pre-populate primary keys.
  • INSERT_ROW — Inserts a new allocation batch row, accepting the rowid, batch id, name, chart of accounts, actual/security flags, audit columns, and description.
  • LOCK_ROW — Issues a SELECT ... FOR UPDATE against the batch row to serialize concurrent edits, raising an error if the row has been changed by another session.
  • UPDATE_ROW — Updates the mutable attributes of an existing allocation batch, including name, flags, audit columns, and description.
  • DELETE_ROW — Removes an allocation batch identified by its allocation batch id.
  • AUTOCOPY — Copies an existing allocation batch definition, along with its formulas and formula lines, to create a new batch, supporting the standard "copy" action in the allocation setup UI.

Tables Accessed

The package operates against GL_ALLOC_BATCHES and its intersection/sequence table GL_ALLOC_BATCHES_S, which together hold batch headers and key generation. GL_ALLOC_FORMULAS and GL_ALLOC_FORMULAS_S store the allocation formulas attached to each batch, while GL_ALLOC_FORMULA_LINES hold the individual debit/credit line definitions; the AUTOCOPY procedure depends on these three tables to duplicate complete batch definitions. GL_AUTO_ALLOC_BATCHES is referenced for automatic allocation batch processing, and DUAL is used for singleton sequence and validation lookups. Because the package runs under APPS, all references resolve through the APPS synonyms for these GL tables.

Usage Notes

In 12.1.1 and 12.2.2 this package is invoked primarily from the Allocations/Allocation Batch form (GLXALBAS) for check_unique, insert, lock, update, and delete operations, and from copy actions implemented through AUTOCOPY. Concurrent allocation programs and mass-allocation processes that need batch integrity checks call CHECK_BATCH and GET_UNIQUE_ID. Custom code should invoke the package rather than writing directly to GL_ALLOC_BATCHES, since the package enforces row locking and audit column maintenance. The package is referenced by at least one other APPS package, and the AUTOCOPY routine should be preferred over manual duplication to ensure formulas and formula lines remain consistent.