Search Results build_interco_comma_list




Overview

GCS_DYNAMIC_UTIL_PKG is a utility package owned by the APPS schema in Oracle E-Business Suite and classified as an "OTHER" API rather than a formal public interface. It belongs to the Consolidation (GCS) product family and provides a small set of helper routines whose purpose is to construct fragments of dynamically generated SQL at run time. Rather than performing business transactions itself, the package builds text that other GCS programs assemble into SELECT, WHERE, ORDER BY, and GROUP BY clauses.

The package is dated to the 12.1.1 code line (header revision gcsdynutils.pls 120.1, dated 2005) and remains present in the 12.2.2 code environment. Its routines are oriented around the GCS concept of "dimensions" - consolidation dimensions such as entity, account, period, and intercompany segments - and around a helper table, AD_DDL, that supplies row numbering used when generating Ad DDL statements.

Key Procedures and Functions

  • BUILD_COMMA_LIST - Constructs a comma-delimited list of dimensions, optionally substituting default text when a dimension is not in use. It is used to build column lists for Select, Order By, or Group By clauses. The documentation notes that when default text is supplied it must include the trailing comma, and the function returns the next available line number for AD_DDL.
  • BUILD_JOIN_LIST - This is the object matching the user search term. It builds a comma-delimited list of join conditions between dimensions, skipping any dimension that is not used, and is intended for building Where clause join predicates. It accepts left, middle, and right text fragments placed around and between the two dimensions, plus a first row number for AD_DDL. Like BUILD_COMMA_LIST, it returns the next line number.
  • BUILD_FEM_COMMA_LIST - A variant of the comma-list builder oriented toward Financial Enterprise Management (FEM) dimension handling.
  • BUILD_INTERCO_COMMA_LIST - A variant of the comma-list builder specialized for intercompany (interco) dimension handling.
  • INDEX_COL_LIST - Produces a list of indexed columns, used when generating index definitions or column references for dynamic SQL.

In total, five routines are documented for this package. Each is intended to return or emit SQL text fragments rather than data.

Tables Accessed

The only table documented for this package, accessed through an APPS synonym, is AD_DDL. AD_DDL is the Applications DDL staging table used during the application patching and installation process to hold SQL statements to be executed. The package's row-numbering convention - the p_first_rownum argument carried by BUILD_COMMA_LIST and BUILD_JOIN_LIST, and the returned next-row number - indicates that the generated SQL fragments are written as rows into AD_DDL so they can be executed in sequence by the AD utilities.

Usage Notes

GCS_DYNAMIC_UTIL_PKG is a developer utility package, not a user-facing API. It is invoked from PL/SQL code that assembles dynamic consolidation SQL, most likely during GCS setup, patch, or custom extension work. The ETRM metadata records that it is referenced by thirteen other packages, confirming its role as a shared low-level helper. Because the arguments are plain text fragments, callers must ensure that the left, middle, and right strings and the prefix and suffix strings are syntactically correct; the package performs no validation and no SQL parsing. The documented example call, GCS_DYNAMIC_UTIL_PKG.Build_Comma_List('g.', '', '', 123), illustrates the typical pattern: a table alias prefix, null suffix and default text, and an integer row number seeding the AD_DDL output. Custom developers extending GCS should treat the package as an internal implementation detail and not as a supported public interface, and should exercise care when relying on it across 12.1.1 and 12.2.2 since it is not a formally committed API.