Search Results gl_historical_rates_pkg




Overview

GL_HISTORICAL_RATES_PKG is a PL/SQL package owned by the APPS schema within the Oracle E-Business Suite, classified under the Application Programming Interface (API) as OTHER. It is documented as a valid object in Oracle General Ledger for both ETRM release levels cited (12.1.1 and 12.2.2), and its DDL indicates that the package specification and package body are both present, with dependencies resolved against the SYS.STANDARD package.

The business function of this package is to provide a controlled maintenance interface for historical currency conversion rate definitions used by General Ledger translation. Historical rates allow an organization to store a fixed rate for a given ledger, period, and balancing segment combination, so that account balances can be translated or reported using a rate that does not vary with the standard daily or period rate tables. The package encapsulates row-level validation, key uniqueness enforcement, locking, and DML against the GL_HISTORICAL_RATES table, thereby insulating the underlying table structure from calling forms, concurrent programs, and custom extensions.

Key Procedures and Functions

The ETRM metadata documents nine callable units within the package:

  • CHECK_UNIQUE — Verifies that no existing historical rate definition conflicts with the keys supplied by the caller. This is the primary integrity gate used before any insert or update is committed.
  • INSERT_ROW — Creates a new record in GL_HISTORICAL_RATES after the caller-supplied keys and rate values have been validated.
  • LOCK_ROW — Acquires a row-level lock on an existing historical rate record. This is the standard concurrency control step preceding an update or delete in an Oracle Forms–based maintenance flow.
  • UPDATE_ROW — Modifies an existing historical rate record, typically following LOCK_ROW and CHECK_UNIQUE to prevent lost updates and duplicate key combinations.
  • DELETE_ROW — Removes a historical rate record that is no longer required.
  • VALDIATE_SEG — Validates a single balancing segment value against the key flexfield definition before it is accepted into a rate record. The spelling of the name is as documented in the source metadata.
  • VALDIATE_SEG_2 — A companion validation routine for a second balancing segment position, used where the ledger's chart of accounts carries more than one balancing segment.
  • INSERT_ROW_WEBADI_WRAPPER — A wrapper entry point that adapts INSERT_ROW for invocation through the Web ADI (Web Applications Desktop Integrator) upload pathway, which is the principal mechanism by which historical rates are mass-loaded in 12.x environments.
  • GET_BAL_SEG — Returns the balancing segment value associated with a given rate record or context, supporting validation and downstream reporting logic.

Tables Accessed

The package operates against the following tables through APPS synonyms:

  • GL_HISTORICAL_RATES — The primary transaction table. It holds the historical rate definitions that the insert, update, delete, and lock routines read and write.
  • FND_ID_FLEX_SEGMENTS — The key flexfield segment definition table. It is consulted by the segment validation routines to confirm that a supplied balancing segment value belongs to a valid segment position in the ledger's chart of accounts.
  • FND_SEGMENT_ATTRIBUTE_VALUES — Supplies the segment attribute settings used to determine whether a segment qualifies as a balancing segment and whether it is enabled or secured.
  • GL_LEDGERS — Provides ledger context so that rate records are validated against a valid, defined ledger.
  • GL_PERIOD_STATUSES — Confirms that the accounting period referenced by a rate record exists and can be resolved to an open or valid period state.
  • DUAL — Used for single-row lookups and PL/SQL expression evaluation.

Usage Notes

GL_HISTORICAL_RATES_PKG is an internal maintenance API rather than a public, externally documented integration interface. It is most commonly invoked in two ways. First, the General Ledger historical rates maintenance form calls the insert, lock, update, delete, and validation routines as the user maintains rate records interactively. Second, the INSERT_ROW_WEBADI_WRAPPER entry point is called by the Web ADI upload flow when historical rates are loaded in bulk from a desktop spreadsheet.

Because the package is classified as OTHER and is referenced by no other documented packages, it is not part of a formal published API contract. Custom code that calls it directly inherits a dependency on the GL_HISTORICAL_RATES table layout and on the key flexfield configuration of the target ledger, both of which are customer-specific. Extensions should prefer the supported form or Web ADI pathways, and any direct invocation should be limited to the same validated sequence the package expects: uniqueness check, row lock, then DML, with segment validation performed before values reach GL_HISTORICAL_RATES.