Search Results add_seg_qualifier
Overview
FND_FLEX_KEY_API is a public PL/SQL package in the APPS schema that provides a programmatic interface for the definition and maintenance of Oracle E-Business Suite key flexfields (KFFs). It is classified as an API in the ETRM metadata, meaning it is a documented, supported entry point for customer and partner extension code rather than an internal helper package. The package addresses the metadata layer of key flexfield configuration: it allows a caller to register a flexfield definition, establish its structures and segments, and attach the various qualifiers that drive validation and display behaviour. In Oracle EBS 12.1.1 and 12.2.2, key flexfields are central to accounting (Accounting Flexfield), asset tracking, item definition, and many other business flows, so the ability to create or modify their definitions from code is significant for implementation and migration tooling. The package declares a flexfield_type record that encapsulates the identifying attributes of a flexfield, including application short name, flexfield code, table name, concatenated segment view, unique ID column, and the column that identifies the structure. It requires a session mode setting so that seed data and customer data operations remain distinct, and it provides validation and debug controls for controlled execution.
Key Procedures and Functions
The metadata documents 49 procedures and functions. Utility routines include DEBUG_ON and DEBUG_OFF, which enable or disable additional diagnostic output; SET_VALIDATION, which turns validation logic on or off during processing; SET_SESSION_MODE, which selects either seed data or customer data context; VERSION, which returns the package header revision; and MESSAGE, which returns the current error message text. Flexfield-level routines include FLEXFIELD_EXISTS, NEW_FLEXFIELD, FIND_FLEXFIELD, REGISTER, and DELETE_FLEXFIELD, which respectively test for existence, initialise a new definition, locate an existing definition, persist a definition, and remove one. Column helpers ENABLE_COLUMN and ENABLE_COLUMNS_LIKE activate the underlying table columns required by a flexfield. Qualifier routines ADD_FLEX_QUALIFIER and DELETE_FLEX_QUALIFIER manage flexfield-level qualifiers, while ADD_SEG_QUALIFIER and DELETE_SEG_QUALIFIER manage segment-level qualifiers; FILL_SEGMENT_ATTRIBUTE_VALUES populates segment attribute data. Structure routines NEW_STRUCTURE and FIND_STRUCTURE create and locate flexfield structures. The presence of ADD_SEG_QUALIFIER, the term the user searched for, confirms that segment qualifier maintenance is an explicitly supported operation.
Tables Accessed
The package reads and writes the core flexfield repository tables through APPS synonyms. FND_ID_FLEXS, FND_ID_FLEX_STRUCTURES, and FND_ID_FLEX_SEGMENTS define flexfields, their structures, and their segments. FND_COMPILED_ID_FLEXS and FND_COMPILED_ID_FLEX_STRUCTS hold compiled runtime representations. FND_FLEX_VALUE_SETS provides validation value set definitions. FND_APPLICATION and FND_TABLES supply application and table metadata, while FND_COLUMNS supports the column-enabling routines. Validation behaviour is governed by FND_FLEX_VALIDATION_RULES, FND_FLEX_VALIDATION_RULE_LINES, FND_FLEX_VALIDATION_QUALIFIERS, FND_FLEX_INCLUDE_RULE_LINES, FND_FLEX_EXCLUDE_RULE_LINES, and FND_FLEX_VALIDATION_RULE_STATS. Together these tables describe how each segment is validated and which qualifiers apply.
Usage Notes
FND_FLEX_KEY_API is typically invoked from custom PL/SQL, migration scripts, or diagnostic utilities rather than directly from a form. Correct use requires setting the session mode before any definitional change, and validation should be managed deliberately because the package can operate with validation disabled for bulk work. The package is referenced by 58 other packages, indicating that it is a foundational component in the flexfield definition stack. Because it writes to shared configuration tables, it should be run in a controlled environment, generally after backing up affected flexfield definitions.