Search Results seg_order
Overview
The APPS.GL_HISTORICAL_RATES_PKG package body is a server-side PL/SQL construct within the Oracle E-Business Suite General Ledger module. It encapsulates the data-access and validation logic used to maintain records in the GL_HISTORICAL_RATES table, which stores historical translation and revaluation rates associated with a specific ledger, accounting flexfield combination, period, target currency, and usage code. The package provides a programmatic interface (an "OTHER" classified API) through which Oracle Forms, concurrent processing, and WebADI-based data loading operate against historical rate data, ensuring transactional integrity and enforcing business rules such as duplicate prevention.
A distinguishing characteristic of this package is its handling of accounting flexfield segment validation. Two procedures, VALDIATE_SEG and VALDIATE_SEG_2, reference FND_ID_FLEX_SEGMENTS and FND_SEGMENT_ATTRIBUTE_VALUES to verify that the code combination supplied by the caller is valid for the operating ledger. This is directly relevant to the search term "seg_order," which corresponds to the column SEGMENT_ORDER in FND_ID_FLEX_SEGMENTS — the attribute that governs the positional sequence of a segment within a key flexfield structure and is consulted during segment-level validation.
Key Procedures and Functions
CHECK_UNIQUE— Validates that no existing historical rate record duplicates the incoming combination of ledger, code combination, period, target currency, and usage code. On detection of a duplicate it raises theGL_DUPLICATE_HISTORICAL_RATEmessage and propagates an application exception.INSERT_ROW— Inserts a new historical rate row, accepting ledger, period name, period number, period year, code combination, target currency, update flag, audit columns, rate type, translated rate and amount, account type, descriptive attributes, context, and usage code.LOCK_ROW— Acquires a row-level lock on an existing historical rate record prior to modification.UPDATE_ROW— Updates an existing historical rate record after the row has been locked.DELETE_ROW— Removes a historical rate record fromGL_HISTORICAL_RATES.VALDIATE_SEG— Performs flexfield segment validation for the supplied code combination, drawing on the segment definition and attribute-value tables.VALDIATE_SEG_2— A companion validation routine performing an alternate or extended segment check, likely covering qualification and attribute-value criteria.INSERT_ROW_WEBADI_WRAPPER— A wrapper procedure provided for the WebADI desktop integration, allowing spreadsheet-based uploads of historical rate records while reusing the core insert logic.GET_BAL_SEG— Returns a balance or segment-related value, used by dependent logic to resolve segment information.
Tables Accessed
GL_HISTORICAL_RATES— the primary transactional table; the target of insert, update, delete, and uniqueness-check operations.FND_ID_FLEX_SEGMENTS— provides the segment definitions, includingSEGMENT_ORDER, used by the validation procedures.FND_SEGMENT_ATTRIBUTE_VALUES— supplies segment attribute settings used in validation.GL_LEDGERS— confirms the ledger and its associated chart of accounts.GL_PERIOD_STATUSES— supports validation of the period against the ledger's open or closed statuses.DUAL— used as the single-row source for cursor and expression evaluation.
Usage Notes
The package is typically invoked from the Oracle Forms-based Historical Rates maintenance screen, where the Form triggers execute the row-level operations. The INSERT_ROW_WEBADI_WRAPPER is called from WebADI integrators that upload rate data from spreadsheets. Because the package is classified as "OTHER" and referenced by zero other packages, it is not a shared dependency for other PL/SQL units; instead it acts as a self-contained data-access layer. Customers extending historical rate functionality should call these procedures rather than issuing direct DML, thereby preserving duplicate checks, locking, and segment validation.