Search Results get_parent_segment




Overview

XLA_FLEX_UTIL is a utility package owned by the APPS schema in Oracle E-Business Suite, classified under the ETRM metadata as a utility (UTIL) API. Its purpose is to centralise access to Accounting Key Flexfield configuration data so that other modules of the Subledger Accounting (XLA) architecture, and their callers, do not need to query the underlying Application Object Library flexfield tables directly. The package resolves structural information about the chart of accounts — segment ordering, segment numbers, segment labels, prompt text, the application column name used to store each segment, and the qualifiers that identify the balancing segment and natural account segment — and returns this information to the calling program through OUT parameters.

Because every Subledger Accounting entry requires a valid accounting flexfield combination, downstream code repeatedly needs to know how a given chart of accounts is configured. XLA_FLEX_UTIL provides that knowledge in a single, reusable location, insulating the accounting engine from changes in flexfield definition storage and allowing the same lookups to be reused by multiple subledger applications.

Key Procedures and Functions

  • GETSEGMENTINFO — Returns the accounting flexfield segment number and segment order number for a specified chart of accounts identifier. It populates a PL/SQL associative array of segment information records, giving callers a complete ordered picture of the segments defined for the chart of accounts.
  • GET_ACCOUNT_FLEX_INFO — Returns a broad set of accounting flexfield attributes for a given chart of accounts identifier, including the segment delimiter, the enabled segment count, the segment ordering clause, the natural account segment number, the application column name for the account segment, the account segment prompt, and the balancing segment definition. It is the primary configuration lookup used by downstream accounting routines.
  • GET_ORDERED_ACCOUNT — Produces an account representation ordered according to the flexfield segment order, allowing a combination to be presented or compared consistently with the chart of accounts definition.
  • IS_SEGMENT_DEPENDENT — Determines whether a segment is dependent on another segment. Dependent segments use parent values from a value set to restrict the list of valid child values, so this check is required before validating or deriving a segment value.
  • GET_PARENT_SEGMENT — The function associated with the user's search term. It retrieves the parent segment information for a given segment, supporting the resolution of parent–child value relationships within a dependent value set. This is the routine callers use when they must identify the controlling (parent) segment that governs the valid values of a dependent segment.
  • GET_SEGMENT_NUMBER — Returns the segment number associated with a named or labelled segment of the chart of accounts. It allows callers to map a logical segment label or qualifier to the physical segment position used when building or parsing an account combination.

Tables Accessed

The package reads the Application Object Library flexfield definition tables through APPS synonyms:

  • FND_ID_FLEXS — Provides the key flexfield definition header, identifying the accounting flexfield structure being interrogated.
  • FND_ID_FLEX_SEGMENTS — Supplies the segment definitions for that structure, including segment numbers, order, prompts, and associated value sets and column names.
  • FND_FLEX_VALUE_SETS — Identifies the value set attached to each segment, needed to determine whether a segment is dependent and to resolve parent values.
  • FND_FLEX_VALIDATION_TABLES — Describes the parent–child validation relationships between segments, supporting IS_SEGMENT_DEPENDENT and GET_PARENT_SEGMENT.

Usage Notes

XLA_FLEX_UTIL is a server-side PL/SQL utility and is not itself exposed as a form or concurrent program interface. It is invoked from other PL/SQL packages, from Subledger Accounting extraction and accounting programs, and from custom code that must understand the chart of accounts structure. It is referenced by at least one other documented package. Typical invocations occur during account combination validation, segment derivation, and when dependent segments must be resolved to their parent values. Because the routines return data through OUT parameters, callers should declare the appropriate record and table types and handle the BOOLEAN return where documented. The metadata lists no dependencies on concurrent program submissions or user interface layers, confirming its role as a shared internal service routine for flexfield structure resolution.