Search Results file_write




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:

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.