Search Results begin_cr_select
Overview
APPS.GL_GLYRLBGE_XMLP_PKG is a generated PL/SQL package that supports the Oracle General Ledger "Year-End Closing Balances" style XML Publisher report. In Oracle EBS 12.1.1 and 12.2.2, Oracle Reports and XML Publisher concurrent programs are implemented as PL/SQL packages that begin with a _XMLP_PKG or report-package suffix. The package encapsulates the report's parameters, session-level globals, data-fetch logic, and formula columns that the report layout invokes at runtime.
The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling APPS schema rather than the package owner. Its header exposes numerous public variables (for example P_LEDGER_ID, P_PERIOD_NAME, P_START_ACCOUNT, P_END_ACCOUNT, P_COMPANY, P_CURRENCY_CODE, P_CONC_REQUEST_ID) that hold concurrent-program parameters and derived report values. Several of these globals, including BEGIN_DR_SELECT, END_DR_SELECT, PER_DR_SELECT, BEGIN_CR_SELECT, END_CR_SELECT, PER_CR_SELECT, ACCOUNTING_SEGMENT_WHERE, and BALANCING_SEGMENT_WHERE, are initialized to the neutral predicate '1' or '1 = 1' and are later rewritten by the BeforeReport trigger to build dynamic WHERE clauses.
Key Procedures and Functions
The documented 42 routines fall into several categories:
- BEFOREREPORT — The standard Reports trigger executed before the query runs. It initializes parameters, resolves ledger and currency information, and mutates the dynamic SQL fragment globals (including BEGIN_DR_SELECT and related SELECT strings) so the report's main query returns the correct account range and balancing segment rows.
- NET_CRFORMULA and related formula functions (COMP_NET_CRFORMULA, CL_NET_CRFORMULA, SC_NET_CRFORMULA, GR_NET_CRFORMULA, GRAND_NET_CRFORMULA) — Compute net credit balances at company, class, sub-class, group, and grand-total levels for the report layout.
- GL_GET_LEDGER_INFO — Retrieves ledger metadata such as chart of accounts and ledger name for the requested ledger.
- GL_GET_FIRST_PERIOD — Determines the first period associated with the selected ledger and period range.
- GET_INDUSTRY_CODE — Returns the industry classification used to conditionally format or filter report output.
- SET_DISPLAY_FOR_GOV / SET_DISPLAY_FOR_CORE — Control display behavior depending on whether the installation is a government or commercial (core) configuration.
- G_MAINGROUPFILTER, G_COMPANYGROUPFILTER, G_CLASSGROUPFILTER, G_SUB_CLASSGROUPFILTER, G_GROUPSGROUPFILTER — Group-level filter functions that drive hierarchical summarization in the report.
- COMPANY_LPROMPT_NDFORMULA, C_BAL_LPROMPTFORMULA, ZERO_INDICATORFORMULA — Lexical prompt and indicator formulas used by XML Publisher/Reports layout templates.
Tables Accessed
According to the ETRM metadata, the package references the following APPS synonyms:
- GL_LEDGERS — Source of ledger name, chart of accounts, and currency attributes used by GL_GET_LEDGER_INFO and BeforeReport.
- GL_PERIOD_STATUSES — Provides period status and first-period information used by GL_GET_FIRST_PERIOD and the report query.
- GL_ACCESS_SETS — Enables access-set security filtering so users see only authorized ledgers and balancing segments.
Usage Notes
This package is not called directly by end users or custom code; it is invoked implicitly when the associated XML Publisher/Reports concurrent program is submitted from the General Ledger responsibility or from the Submit Request form. The concurrent manager passes the request ID and parameters, then Oracle Reports or XML Publisher instantiates the package and invokes BEFOREREPORT followed by the formula functions during layout rendering. Because the package is generated by Oracle Reports, customizations should be limited to the report definition rather than the package body; modifying it directly risks being overwritten during patching. The use of AUTHID CURRENT_USER means the package relies on the APPS schema synonyms and the caller's access privileges, reinforcing the importance of correct responsibility and access-set configuration.