Search Results gcs_formula_statements




Overview

GCS_FORMULA_STATEMENTS_PKG is a PL/SQL package body in the APPS schema that provides the data-access layer for the GCS_FORMULA_STATEMENTS table, part of the Oracle EBS Global Consolidation System (GCS) module. Its stated purpose, per the package header comment, is to supply "package procedures for GCS formula statements table." Formula statements are the textual and variable-bearing expressions that the consolidation engine evaluates to derive or validate consolidation data. Each statement is uniquely identified by the composite key (statement_num, rule_type_code), and the package enforces that key as the basis for every insert, update, load, and translation operation.

The package was created on 27-APR-04 by J Huang and carries the file header gcserfsb.pls, version 120.1 (2005/10/30). It is classified as OTHER (a table-handler API rather than a business-event or workflow API) and is referenced by no other packages, indicating it is called directly by forms, concurrent programs, or custom code rather than through an intermediate wrapper.

Key Procedures and Functions

  • INSERT_ROW — Inserts a new formula statement row. The documented logic raises NO_DATA_FOUND when statement_num or rule_type_code is NULL, and performs an existence check against GCS_FORMULA_STATEMENTS on the (statement_num, rule_type_code) key before inserting; the row is inserted only WHERE NOT EXISTS, making the procedure idempotent for duplicate keys. It returns the affected ROWID through the row_id IN OUT NOCOPY parameter and re-opens a cursor to confirm the row exists.
  • UPDATE_ROW — Modifies an existing formula statement, keyed by statement_num and rule_type_code, updating statement_text, compiled_variables, and the standard audit columns (last_update_date, last_updated_by, last_update_login).
  • LOAD_ROW — Provides the standard EBS bulk-loading entry point for moving formula statement definitions between environments (for example, via FNDLOAD or a dataload concurrent request), inserting or updating rows as required.
  • TRANSLATE_ROW — Supports the EBS translation mechanism, allowing statement text and related translatable columns to be maintained per installed language.

All four procedures operate within the standard EBS audit-column convention (WHO columns) and assume the caller supplies the values verbatim rather than deriving them internally.

Tables Accessed

  • GCS_FORMULA_STATEMENTS (via APPS synonym) — The sole business table. It holds statement_num, rule_type_code, statement_text, compiled_variables, and the WHO audit columns. All four procedures read and/or write this table; INSERT_ROW and LOAD_ROW use it for both the existence probe and the DML.
  • DUAL — Used as the SELECT source for the INSERT ... SELECT ... WHERE NOT EXISTS pattern, enabling a conditional, set-based insert without a procedural IF/ELSE around the DML.

Usage Notes

The package is the supported maintenance path for GCS formula statement data and is normally invoked from the Global Consolidation System setup forms that maintain consolidation rules, or from concurrent programs and dataload utilities that migrate statement definitions between instances. Because rule_type_code is a mandatory component of the primary key, any custom caller must supply both statement_num and rule_type_code; omitting either causes INSERT_ROW to raise NO_DATA_FOUND rather than insert an incomplete row. INSERT_ROW's WHERE NOT EXISTS guard means repeated calls with an identical key are silently ignored, so callers should check the returned row_id to confirm that an insert actually occurred, or route true updates through UPDATE_ROW. In 12.1.1 and 12.2.2 the package is unchanged in behavior; on 12.2.x it continues to run in the APPS schema and is unaffected by the online patching editioning model for this table.