Search Results needs_tax




Overview

APPS.GL_JE_BATCHES_PKG is a server-side PL/SQL package in Oracle EBS General Ledger that encapsulates validation and insertion logic for the GL_JE_BATCHES entity. Its stated purpose, as documented in the package header, is "to contain validation and insertion routines for gl_je_batches." Journal batches are the top-level container for journal entries in General Ledger; before a batch and its journals can be created, approved, or posted, the batch must satisfy naming, uniqueness, and tax/approval criteria. This package centralizes those checks so that both Oracle Forms and other program units apply consistent rules. The header carries a revision string ("glijebas.pls 120.11.12000000.2"), and history entries date the original creation to 1993 and the tax-related routine to 2004, indicating a package that has been maintained across many EBS releases and remains present in 12.1.1 and 12.2.2.

Key Procedures and Functions

The documented routines (15 total in the 12.2.2 metadata) cover uniqueness, identification, approval, tax, header population, and DML:

  • CHECK_UNIQUE — Verifies that a batch name is unique within the batch period for the specified ledger, using batch name, period name, chart of accounts, calendar, period type, and row identifier as inputs.
  • GET_UNIQUE_ID — Returns a unique batch identifier for a new batch record.
  • NEEDS_APPROVAL — Returns TRUE if the batch contains at least one journal requiring approval, otherwise FALSE.
  • NEEDS_TAX — Returns TRUE if the batch contains at least one journal that needs tax, otherwise FALSE. This is the routine most directly associated with the search term "needs_tax."
  • HAS_LINES — Determines whether the batch (or its journals) contains journal lines.
  • ALL_STAT_HEADERS — Evaluates whether all headers in the batch are statistical, supporting the statistical journal distinction in GL.
  • BC_LEDGER — A ledger-related helper used in batch processing or validation logic.
  • POPULATE_FIELDS — Fills in derived or default column values for a batch row before insertion.
  • INSERT_ROW — Inserts a new row into the batch table (and its _S audit table as applicable).
  • UPDATE_ROW — Updates an existing batch row.
  • LOCK_ROW — Acquires a row-level lock to protect concurrent modifications.
  • DELETE_ROW — Deletes a batch row.

Parameter lists are not reproduced here; the package header documents arguments for CHECK_UNIQUE and the calling conventions for GET_UNIQUE_ID, NEEDS_APPROVAL, and NEEDS_TAX.

Tables Accessed

The package works against GL_JE_BATCHES, the base batch table, and GL_JE_BATCHES_S, its shadow/audit table used by EBS's Who Columns auditing mechanism. It reads GL_JE_HEADERS (journals within the batch) and GL_JE_LINES (journal lines) to satisfy routines such as NEEDS_APPROVAL, NEEDS_TAX, HAS_LINES, and ALL_STAT_HEADERS, which must inspect child records rather than the batch header alone. GL_JE_SOURCES is referenced to resolve journal source attributes. GL_LEDGERS supplies ledger context for uniqueness and ledger-related checks, while DUAL supports trivial single-row evaluations such as generating a unique ID. All references resolve through APPS synonyms.

Usage Notes

GL_JE_BATCHES_PKG is classified as OTHER (not a public open interface API), so it is intended primarily for internal use by Oracle GL forms and concurrent programs rather than as a formally supported external integration point. In practice it is invoked from the Journal Batches and Enter Journals forms on batch insert, update, and validation, and may be called from custom code that programmatically creates batches in GL. Because NEEDS_TAX and NEEDS_APPROVAL depend on downstream journal and line state, callers should invoke them after headers and lines exist. The ETRM metadata records one other package referencing this unit, indicating tightly coupled internal dependencies. Customizations should respect the package's validation order and avoid bypassing CHECK_UNIQUE or the row-locking routines.