Search Results end_balformula




Overview

APPS.GL_GLXETB_XMLP_PKG is the PL/SQL package that backs the Oracle General Ledger "Encumbrance Trial Balance" XML Publisher (BI Publisher) concurrent report, GLXETB. In Oracle EBS 12.1.1 and 12.2.2 the report is registered as a concurrent program whose XML output is generated by this package and then rendered through a BI Publisher data template. The package encapsulates the report's parameter handling, its data-model SQL fragments, and its layout-level computations, allowing the report definition to remain declarative while the runtime logic resides in the database tier.

The package declares several package-level variables that correspond to the report's concurrent program parameters: P_CONC_REQUEST_ID, P_LEDGER_ID, P_ENCUMBRANCE_TYPE_ID, P_PERIOD_NAME, and P_ACCESS_SET_ID. It also defines compile-time string constants such as STRUCT_NUM, SELECT_BAL, SELECT_ALL, SELECT_ACCT, ORDERBY_BAL, ORDERBY_ACCT, ORDERBY_ALL, ORDERBY_BAL2, and ORDERBY_ACCT2. These constants build the SELECT and ORDER BY fragments used by the XML data template, concatenating the 30 accounting flexfield segments (cc.segment1 through cc.segment30) with newline separators so that multi-segment account combinations display in a stacked format. The $Header directive shows the package was last revised at version 120.0 in December 2007, indicating a stable, low-change component carried forward into the 12.1.1 and 12.2.2 releases.

Key Procedures and Functions

ETRM documents 26 procedures and functions, categorized as follows:

  • BEFOREREPORT — Standard XML Publisher pre-report trigger. It initializes package state, populates the report parameters (ledger, encumbrance type, period, access set) from the concurrent request, and prepares values used by later formula columns.
  • AFTERREPORT — Standard post-report trigger that releases package state after the XML output is produced.
  • END_BALFORMULA — The formula column the user searched for. It computes the ending balance displayed in the trial balance output based on the selected ledger, period, and encumbrance type, combining the beginning balance with period activity.
  • ENCUMBRANCE_TYPEFORMULA — Derives the encumbrance type description or code for display in the report header or detail rows.
  • GL_FORMAT_CURRENCY — Formats monetary amounts according to the ledger currency and report formatting conventions.
  • Group filter functions (G_PAGE_BREAKGROUPFILTER, G_ACCT_DATAGROUPFILTER, G_BALANCESGROUPFILTER) — Control grouping and page breaks in the XML template, separating account-level and balance-level sections of the report.
  • Parameter/constant accessors (STRUCT_NUM_P, SELECT_BAL_P, SELECT_ALL_P, ORDERBY_BAL_P, ORDERBY_ACCT_P, ORDERBY_ALL_P, SELECT_ACCT_P, ORDERBY_BAL2_P, ORDERBY_ACCT2_P, ACCESS_SET_NAME_P, WHERE_DAS_P, PARAM_LEDGER_CURR_P) — Return the SELECT, ORDER BY, structure number, access set name, and ledger currency values to the data template. PARAM_LEDGER_CURR_P supplies the ledger's currency for currency formatting, and WHERE_DAS_P supplies the data access set predicate that enforces security.

Tables Accessed

  • GL_LEDGERS — Read to validate the ledger parameter and retrieve the ledger currency and other ledger attributes used by PARAM_LEDGER_CURR_P and the balance calculations.
  • GL_ACCESS_SETS — Read to resolve the access set identifier for data access security, supporting ACCESS_SET_NAME_P and WHERE_DAS_P.
  • DUAL — Used for scalar evaluations and parameter defaulting.

Usage Notes

The package is invoked exclusively through the Encumbrance Trial Balance concurrent program in General Ledger. The concurrent manager calls BEFOREREPORT before the XML data template executes, formula columns such as END_BALFORMULA and ENCUMBRANCE_TYPEFORMULA run during data extraction, and AFTERREPORT runs on completion. Direct calls from custom code are not supported; the package is not referenced by any other documented package and is classified as OTHER in the ETRM API registry. Customizations should be applied through the underlying BI Publisher template or by extending the report rather than modifying GL_GLXETB_XMLP_PKG.