Search Results get_where_clause




Overview

APPS.BEN_BENXLAYT_XMLP_PKG is a packaged report logic unit within the Oracle E-Business Suite Advanced Benefits (BEN) product family. Its header comment (BENXLAYTB.pls 120.1, dated 2007/12/10) indicates it is the package body supporting the BENXLAYT XML Publisher report, whose subject matter concerns benefit extract layouts and the criteria applied when benefits extraction data is assembled and printed. The package exists to encapsulate the PL/SQL that an XML Publisher concurrent program would otherwise embed in its data model, allowing the report to render formatted output that combines data element names, configured operators, comparison values, and lookups into human-readable descriptions.

The function of principal interest in this package is COMMENTSFORMULA, which constructs descriptive text for a benefit extract. It resolves total functions from the BEN_EXT_TTL_FNCTN lookup, decodes operators through the BEN_EXT_OPER lookup, and assembles a concatenated comment string that explains how an extraction total was computed. A user searching for "get_where_clause" is looking at a cursor declared inside this function rather than a standalone program unit; get_where_clause is a local, private cursor and is therefore not exposed in the documented procedure list.

Key Procedures and Functions

  • COMMENTSFORMULA — Builds the descriptive comment text for a benefit extract data element. It evaluates the data element type (string, date, or total), retrieves the meaning of the total function, and, when a condition data element exists, walks the configured where-clause records to produce a readable expression combining a condition data element name, a decoded operator, and a comparison value. This is the function in which the get_where_clause cursor is declared and used.
  • BEFOREREPORT — The standard XML Publisher before-report trigger, executing setup logic required prior to the report's data retrieval, such as initializing package-level state or report parameters.
  • AFTERREPORT — The standard XML Publisher after-report trigger, used for cleanup or post-processing once report output has been produced.

The get_where_clause cursor itself is defined with a single bind parameter identifying an extract data element, and it returns the condition data element identifier, operator code, comparison value, and AND/OR connective from BEN_EXT_WHERE_CLAUSE. It is an internal implementation detail, not a published API.

Tables Accessed

  • BEN_EXT_DATA_ELMT — Read to resolve an extract data element identifier into its descriptive name, both for the sum data element and for each condition data element referenced by the where clause.
  • BEN_EXT_WHERE_CLAUSE — Read by the get_where_clause cursor to obtain the stored condition structure (condition element, operator code, value, and AND/OR code) for a given extract data element.

Additional reads against HR_LOOKUPS (lookup types BEN_EXT_TTL_FNCTN and BEN_EXT_OPER) and calls to HR_GENERAL.DECODE_LOOKUP and FND_GLOBAL.LOCAL_CHR supply the translated text and line separators used in the generated comments.

Usage Notes

This package is invoked by the BENXLAYT XML Publisher concurrent program during report execution. BEFOREREPORT and AFTERREPORT are called automatically by the XML Publisher engine; COMMENTSFORMULA is called from the report's data model SQL or group logic to populate the comment column of the extract layout output. It should not be called directly from forms or custom concurrent programs, and no other packages reference it. Because the generated comment text depends on the active language, output varies by session locale. The package is classified as OTHER in the ETRM and is not an approved extension point; customizations should target the underlying configuration tables rather than the package body.