Search Results get_unique_id




Overview

GL_HISTORICAL_RANGES_PKG is an Oracle E-Business Suite General Ledger package owned by the APPS schema. Its role is to support the historical rate range infrastructure used by General Ledger for currency conversion and translation. Historical rate ranges define the date boundaries within which specific historical currency exchange rates apply when converting or translating balances and journal entries. The package encapsulates the low-level logic required to manage these range rows, most notably the generation of surrogate primary keys. Because the object is classified as OTHER in the ETRM metadata, it is not a published public API; it functions as an internal helper package invoked by higher-level General Ledger components and Oracle Forms modules.

Key Procedures and Functions

The documented package specification exposes a single function, GET_UNIQUE_ID. This function returns a NUMBER and takes no arguments. As described in the header comments, its stated purpose is to "get a new sequence unique id for a new historical ranges row." In other words, it provides the primary key that identifies each record created in the historical rate range table.

The function is called without parameters and is commonly referenced within an Oracle Forms block, as illustrated in the package header example: :block.field := GL_HISTORICAL_RANGES_PKG.get_unique_id;. This pattern indicates that the function is typically invoked during row creation in a form, when a new historical rate range record must be assigned its unique identifier before insertion. Because the function returns the value directly, the caller is responsible for assigning the result to the appropriate column or block item. The metadata documents no additional parameters, return arguments, or side effects beyond the returned sequence value.

Tables Accessed

The package references the base table GL_HISTORICAL_RATE_RANGES_S, which stores the historical rate range definitions, and the DUAL pseudo-table. DUAL is used to obtain the next sequence value—typically a call such as SELECT gl_historical_rate_ranges_s.nextval FROM dual—so that the function can return a fresh unique identifier. The GL_HISTORICAL_RATE_RANGES_S table is the target of that identifier; the unique value produced by GET_UNIQUE_ID becomes the primary key for a newly inserted range row. The package reads the sequence attached to the table and returns the resulting number to the caller; the actual row insertion is performed by the calling component.

Usage Notes

This package is invoked internally by Oracle E-Business Suite General Ledger functionality and is not intended as a general-purpose public API. The most common invocation context is the Oracle Forms user interface used to define and maintain historical rate ranges, where the function supplies the primary key at row creation time. It may also be called from custom code or concurrent processing that programmatically inserts historical rate range records, provided the caller observes the same sequencing convention.

Because the metadata documents only the specification stub, developers should treat the package as an internal, version-dependent helper. When extending or integrating with General Ledger historical rates, best practice is to use supported public APIs for rate maintenance rather than calling GET_UNIQUE_ID directly, unless replicating the exact form behavior. Callers must also ensure that any custom insertion honors the sequence association on GL_HISTORICAL_RATE_RANGES_S to avoid primary key conflicts.