Search Results gcs_lex_invalid_rule_set
Overview
GCS_LEX_MAP_API_PKG is an Oracle EBS Applications (APPS) PL/SQL package belonging to the Financial Consolidation Hub / E-Business Tax lexicography mapping infrastructure, commonly grouped under the GCS module. It provides the programmatic engine that translates user-defined mapping and validation rules — captured declaratively in the GCS_LEX_MAP_* tables — into executable PL/SQL functions that the consolidation engine can invoke at runtime. In essence, the package serves as a code generator and runtime dispatcher: it reads rule definitions, materializes them as stored functions, and then applies those functions against source data to derive mapped values or to validate them.
The package also maintains the FEM (Financial Enterprise Management) object catalog by registering the generated functions as named objects, ensuring that the metadata repository remains synchronized with the runtime code. This design allows business users to configure mappings without writing PL/SQL, while the database layer generates and executes the underlying logic.
Key Procedures and Functions
The package exposes five documented entry points:
- CREATE_MAP_FUNCTIONS — Generates PL/SQL functions that implement the mapping derivations defined in the GCS_LEX_MAP_DERIVATIONS and GCS_LEX_MAP_DRV_DETAILS tables. The generated functions are named using the private constant prefix
gcs_rv_and reference the returned derivation number viagcs_drv_. - APPLY_MAP — Invokes the previously generated mapping functions against source records to produce derived output values. It drives the runtime mapping process during consolidation or data transformation runs.
- CREATE_VALIDATION_FUNCTIONS — Generates the validation functions corresponding to the validation rulesets stored in GCS_LEX_MAP_RULES and GCS_LEX_MAP_CONDITIONS. These rulesets are associated with the value sets and validation tables referenced by FND_FLEX_VALIDATION_TABLES and FND_FLEX_VALUE_SETS.
- APPLY_VALIDATION — Executes the generated validation functions, raising the package's private exceptions (such as GCS_LEX_INVALID_RULE_SET or GCS_LEX_FILTER_ERROR) when a record fails validation.
- AFTER_FEM_REFRESH — A post-refresh hook that re-registers or reconciles the generated functions with the FEM object catalog following an FEM metadata refresh, keeping object definitions current.
The package defines several private exceptions and error codes (EX01 through EX05, EX99) that classify failure conditions such as lookup table derivation returning too many or no rows, type mismatches, and value set or lookup validation failures.
Tables Accessed
The package reads and writes two categories of tables. The rule configuration tables — GCS_LEX_MAP_COLUMNS, GCS_LEX_MAP_CONDITIONS, GCS_LEX_MAP_DERIVATIONS, GCS_LEX_MAP_DRV_DETAILS, GCS_LEX_MAP_PLSQL_FUNCS, GCS_LEX_MAP_RULES, and GCS_LEX_MAP_RULE_SETS — hold the declarative definitions of mappings, validations, and rulesets. The FEM metadata tables — FEM_OBJECT_CATALOG_B, FEM_OBJECT_CATALOG_TL, FEM_OBJECT_DEFINITION_B, FEM_OBJECT_DEFINITION_TL, and the FEM_OBJECT_ID_SEQ / FEM_OBJECT_DEFINITION_ID_SEQ sequences — are used to register generated functions as named objects, with the _TL tables storing translatable descriptions. FND_FLEX_VALUE_SETS and FND_FLEX_VALIDATION_TABLES connect validation rules to Oracle Flexfields value set infrastructure.
Usage Notes
In EBS 12.1.1 and 12.2.2, GCS_LEX_MAP_API_PKG is invoked primarily from consolidation configuration forms and from concurrent programs that process mapping and validation rulesets. CREATE_MAP_FUNCTIONS and CREATE_VALIDATION_FUNCTIONS are typically called when a ruleset is saved or compiled, while APPLY_MAP and APPLY_VALIDATION run during consolidation execution. Because the package generates stored functions dynamically, it must be executed with appropriate privileges, and DDL operations are committed as part of ruleset compilation. Custom integrations should invoke the package through its public API rather than relying on the private exceptions or global constants, which are subject to change between patch levels.