Search Results flex_orderby_all




Overview

APPS.GL_GLXRLVAT_XMLP_PKG is a report-support package for the Oracle General Ledger VAT (Value Added Tax) reporting concurrent program, internally designated GLXRLVAT. It belongs to the XMLP (XML Publisher / BI Publisher) report package family introduced in Oracle E-Business Suite 11.5.10 and carried forward through 12.1.1 and 12.2.2. The package encapsulates the runtime data-fetch and parameter-resolution logic needed by the GLXRLVAT report, including ledger identification, accounting period, currency, tax code, and access set attributes. Within the ETRM metadata it is classified as API classification OTHER, confirming it is a report implementation package rather than a public callable API.

The package addresses a common accounting-flexfield challenge: the General Ledger chart of accounts is composed of up to thirty independently defined segments, and a VAT extract must present and order those segments consistently. The package therefore exposes packaged variables FLEX_SELECT_ALL and FLEX_ORDERBY_ALL that dynamically build the concatenated segment expressions used in the report's SELECT list and ORDER BY clause respectively.

Key Procedures and Functions

ETRM 12.2.2 documents eight procedures and functions within this package:

  • BEFOREREPORT — Fires before the report's main data query, initializing session-level package state and derived attributes required by the report body.
  • AFTERREPORT — Fires after data retrieval, performing cleanup of package state and any post-processing or resource release needed at report completion.
  • STRUCT_NUM_P — Returns the accounting flexfield structure number (STRUCT_NUM) associated with the ledger being reported.
  • LEDGER_NAME_P — Returns the name of the ledger selected by the user, for display in the report header.
  • FLEX_SELECT_ALL_P — Returns the dynamic, concatenated expression referencing the enabled accounting flexfield segments (gcc.SEGMENT1 through gcc.SEGMENT30) for use in the report SELECT clause.
  • FLEX_ORDERBY_ALL_P — Returns the analogous concatenated expression used to order report output by the full accounting flexfield. This is the function directly associated with the searched term "flex_orderby_all".
  • ACCESS_SET_NAME_P — Returns the name of the GL access set in effect, used to scope which ledgers and data the report may display.
  • WHERE_DAS_P — Returns the dynamic WHERE predicate fragment that enforces the Data Access Set (DAS) security filter against the ledger.

Tables Accessed

The package references two base tables through APPS synonyms:

  • GL_LEDGERS — Supplies ledger identity, chart of accounts structure, and currency information needed to resolve STRUCT_NUM_P and LEDGER_NAME_P, and to build the flexfield expressions.
  • GL_ACCESS_SETS — Supplies the access set definition used by ACCESS_SET_NAME_P and the security predicate generated by WHERE_DAS_P.

The accounting flexfield segment values themselves are read from the GL code combination table (GL_CODE_COMBINATIONS, aliased gcc in the segment expressions) by the report's main query, which consumes the FLEX_SELECT_ALL and FLEX_ORDERBY_ALL expressions this package produces.

Usage Notes

This package is invoked indirectly by the GLXRLVAT concurrent program when a user runs the VAT report from General Ledger. The Oracle Reports or XML Publisher runtime calls BEFOREREPORT on entry and AFTERREPORT on completion; the remaining functions are called from within the report's SQL as lexical or formula columns. Because the package is AUTHID CURRENT_USER, all object resolution occurs in the schema of the invoking report session.

Customizations should not modify GL_GLXRLVAT_XMLP_PKG directly, since it is shipped under the APPS schema and patched by Oracle during upgrades. No other packages reference this object, so its surface area is limited to the GLXRLVAT report alone.