Search Results get_batch_type




Overview

XTR_CLEAR_JOURNAL_PROCESS_P is a PL/SQL package body owned by the APPS schema within Oracle E-Business Suite, classified under the ETRM (E-Business Suite Technical Reference Model) as an OTHER API. It belongs to the Oracle Treasury (XTR) product family and provides the programmatic mechanism for clearing treasury accounting journals that have been generated within a specified date or batch identifier range. The package exists to support the periodic housekeeping of the XTR_JOURNALS table, ensuring that journal entries associated with batches are logically removed from active processing once they are no longer required, while respecting transfer status against the General Ledger interface. The header comment records that the object was created on 19-MAY-1999 by user eklau and was last revised under version 120.3 on 29-JUN-2005. As an unversioned internal package body rather than a formal public API, it is intended for controlled invocation from concurrent programs and the treasury application logic rather than for direct customer extension.

Key Procedures and Functions

The package exposes two documented procedures, both central to the journal clearing workflow.

  • CLEAR_JOURNAL_PROCESS — The public entry point. It accepts the caller's input parameters from the concurrent program submission manager (and from the XTRACJNL form or program), performs the necessary data conversion and validation, and delegates the substantive work to the main clearing routine. Its documented parameter set comprises a required company code (p_company_code) and a required start and end date (p_start_date, p_end_date), with the source excerpt also showing batch identifier range parameters (p_batch_id_from, p_batch_id_to). The procedure iterates batch records for the company within the supplied range using a descending batch sequence cursor, derives each batch's accounting period, checks whether the batch has already been transferred to the General Ledger (by testing for a non-null gl_group_id), and inspects batch events for late-arriving batches. It returns the standard concurrent program OUT parameters errbuf and retcode for error reporting and completion status.
  • CLEAR_JOURNALS — The main clearing procedure invoked by CLEAR_JOURNAL_PROCESS. This routine performs the actual removal of journal records created within the input date range, applying the period and batch criteria resolved by the caller.

Tables Accessed

The package operates against the following ETRM-documented tables accessed through APPS synonyms:

  • XTR_BATCHES — The primary driver table. It supplies the batch sequence, company code, period start and end dates, and the GL group identifier used to determine transfer status.
  • XTR_JOURNALS — The target of the clearing operation; journal rows falling within the qualifying batch and date criteria are cleared from this table.
  • XTR_BATCH_EVENTS — Consulted to identify late batches and to evaluate event codes such as the 'JRNLGN' (journal generation) event used in processing logic.
  • XTR_PARTY_INFO — Provides counterparty and company reference information used during processing.
  • XTR_DEAL_DATE_AMOUNTS — Supplies deal-level dated amount data that supports validation and processing of the affected journals.

Usage Notes

XTR_CLEAR_JOURNAL_PROCESS_P is typically invoked from the concurrent program submission manager through a registered concurrent program, which is the primary supported calling path, and additionally from XTRACJNL, the treasury journal-related form or program. Because it is classified as an OTHER API and is referenced by no other documented packages, it should not be treated as a formally supported extension point. Custom code that calls it must supply a valid company code and date or batch range, and must handle the returned errbuf and retcode values. Implementations upgrading between 12.1.1 and 12.2.2 should note the object's long-standing stability since its 2005 revision and confirm that the batch-to-GL transfer check remains satisfied before clearing, since clearing journals for batches already transferred to the General Ledger may require reconciliation outside this package.