Search Results get_flex_value_set_id




Overview

ENI_VALUESET_CATEGORY is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and declared with AUTHID CURRENT_USER. Its header carries the RCS identifier ENIITCTS.pls, version 115.11, dated 2003, indicating that the package originated in the early 11i development cycle and has been carried forward largely unchanged through Release 12.1.1 and 12.2.2. The package belongs to the Oracle Inventory (ENI) module family and addresses the intersection of key flexfield value sets and inventory item category structures.

In Oracle Inventory, item categories are organized into category sets, and category sets are grouped into category structures. The valid values available for a given category set are frequently drawn from a key flexfield value set. ENI_VALUESET_CATEGORY exists to reconcile and populate those relationships, so that category structures and their associated value sets are consistent and usable by downstream item definition and reporting processes. In practice the package is a data-maintenance utility rather than a user-facing API.

Key Procedures and Functions

The package exposes four documented program units:

  • ENI_POPULATE_MAIN — the entry point intended for concurrent manager invocation. It receives the standard concurrent request output parameters (error buffer and return code) and orchestrates the remainder of the processing.
  • ENI_POPULATE_CATEGORY — the worker routine that evaluates the full set of candidate values and creates the corresponding category records. This is where the substantive DML occurs.
  • ENI_VALIDATE_STRUCTURE — a boolean function that verifies the structure of the source data before ENI_POPULATE_CATEGORY is permitted to run. It acts as a pre-flight integrity check, allowing the main procedure to abort cleanly rather than insert inconsistent data.
  • GET_FLEX_VALUE_SET_ID — a function that resolves and returns the flexfield value set identifier associated with a given product structure. It accepts an application identifier, an ID flex code, and a value set / category set identifier, and returns the numeric flex value set ID. This is the unit most commonly referenced by custom code and is the object returned by a search for "get_flex_value_set_id".

Tables Accessed

The package reads and writes through APPS synonyms across two table families:

  • FND_ID_FLEX_STRUCTURES and FND_ID_FLEX_SEGMENTS — the Applications key flexfield definition tables. These are consulted to translate the ID flex code into the underlying structure and segment definitions, and to determine the value set attached to the relevant segment.
  • MTL_CATEGORY_SETS_B and MTL_CATEGORY_SETS — the base and translated (view) definitions of category sets. These identify which category sets participate in a structure and how they are described to the user.
  • MTL_CATEGORIES_B and MTL_CATEGORIES_TL — the base and translated category value tables that receive the rows created by ENI_POPULATE_CATEGORY.
  • MTL_DEFAULT_CATEGORY_SETS — used to determine the default category set assignments for the structure being processed.

Usage Notes

ENI_POPULATE_MAIN conforms to the standard concurrent manager calling convention, so the package is normally scheduled as a concurrent program submitted from an Inventory responsibility or from the System Administrator responsibility. Because it performs bulk category creation, it should be run deliberately and preferably during periods of low transactional activity on the affected category structures.

Custom code that needs to resolve a value set for a category set should call GET_FLEX_VALUE_SET_ID directly; the function returns the flex value set ID as a NUMBER and can be embedded in a SELECT statement. Callers are responsible for supplying correct values for the application ID and ID flex code, as the function performs no independent validation of those inputs.

The package is referenced by one other package in the ETRM inventory, so modifications to its signature or behaviour carry a dependency risk. It is not designated as a public API, and Oracle does not document it for customer extension. Any direct invocation should be treated as a supported-risk activity, with the concurrent program path preferred wherever an equivalent interface exists.