Search Results select_to_flex




Overview

GL_GLXCAR_XMLP_PKG is the generated PL/SQL package that backs the Oracle General Ledger consolidation audit report, published in Oracle E-Business Suite 12.1.1 and 12.2.2. The suffix "XMLP_PKG" identifies it as the runtime wrapper automatically produced by Oracle XML Publisher (BI Publisher) when a concurrent program is defined against an RTF or XML template. The package extracts the data set for the "Consolidation Audit Report" — a reconciliation and audit listing of consolidation activity across ledgers — and passes that data to the template engine for rendering. The declaration uses AUTHID CURRENT_USER, meaning all unqualified object references resolve against the schema of the invoking user, with APPS synonyms bridging to the underlying GL tables. Public package state consists of concurrent request context values (P_CONC_REQUEST_ID, P_CONSOLIDATION_ID, P_PERIOD_NAME, P_USAGE, P_BALANCE_TYPE) plus a set of bind variables populated by the before-report trigger. Among these, SELECT_TO_FLEX and its counterparts build the concatenated, multi-line account strings used to display the "To" and "From" chart of accounts combinations in the report output. The package is self-contained: ETRM records that no other packages reference it. Its source header shows a last revision of 120.0 dated 2007/12/27 by vijranga, consistent with the long-stable 11i/12.x code line.

Key Procedures and Functions

Tables Accessed

The package reads the GL consolidation and ledger definition tables through APPS synonyms. GL_CONSOLIDATION holds the consolidation definition identified by P_CONSOLIDATION_ID and supplies the consolidation name and mapping attributes. GL_LEDGERS provides the ledger name, chart of accounts, and currency for both the source and target ledgers, feeding the *_LEDGER_NAME_P and *_CURRENCY_CODE_P binds. GL_LEDGER_RELATIONSHIPS links parent and subsidiary ledgers, establishing which source ledgers map to the consolidation target. Actual consolidation balances are read through the key flexfield views against the GL_BALANCES family, with the SELECT_*_FLEX lexicals concatenating segments 1 through 30 of the accounting flexfield for display.

Usage Notes

The package is invoked only by the XML Publisher concurrent program that owns the consolidation audit report; it is not called from Oracle Forms, from other PL/SQL packages, or from standard APIs. The parameter list mirrors the concurrent program's report arguments — consolidation, period name, usage, balance type, and chart of accounts — which are read in BEFOREREPORT. The *_P functions are registered as template parameters or data-source lexicals so the RTF template can embed the derived strings (account combinations, ledger names, currencies) directly. Extension points follow the standard XML Publisher model: data definition edits go in the data template, formatting in the RTF layout, and logic changes in the report trigger or the generated package body. Because the package is copied whenever the data template is regenerated, customizations should be reapplied through the XML Publisher administrator rather than patched directly into the generated source.