Search Results l_item_flex_num




Overview

APPS.BOM_CSTRDICR_XMLP_PKG is the server-side PL/SQL package that supports the Oracle Bills of Material cost roll-up detail report in Oracle E-Business Suite 12.1.1 and 12.2.2. The suffix XMLP_PKG follows the Oracle BI Publisher (XML Publisher) naming convention, indicating that the package supplies the before-report, after-report, and formula-level logic consumed by an XML Publisher report template. The report, whose short name is reflected in the header identifier CSTRDICRS.pls, presents a detailed breakdown of item costs across a bill of materials structure, allowing cost accountants and manufacturing analysts to review cost elements at each level of a given structure.

The package is defined with AUTHID CURRENT_USER, so it executes under the privileges of the invoking session rather than the package owner. This is consistent with concurrent-program execution, where the report is launched against a specific operating unit and organization.

Key Procedures and Functions

  • BEFOREREPORT — Executed by the XML Publisher engine prior to report data retrieval. It initializes session context and performs the preliminary setup required before the report query runs.
  • AFTERREPORT — Executed after the report completes. It handles post-processing and cleanup, including the resetting of global package variables.
  • AFTERPFORM — Called after the report parameter form is processed. It is used to finalize parameter-derived values before execution begins.
  • DISP_CURRENCYFORMULA — A formula function that returns a display representation of a currency code, enabling consistent currency presentation in the report output.
  • ORDER_FUNC — A sorting/ordering function that returns a character value used to control the sequence of rows, taking item, category, and unit-of-measure inputs into account.
  • C_FLEXPAD_ITEMFORMULA — A formula column that produces the flexfield-padded representation of the item key flexfield for display purposes.
  • C_FLEXPAD_CATFORMULA — The counterpart formula that produces the flexfield-padded representation of the category key flexfield.

Tables Accessed

The documented table reference is FND_ID_FLEX_STRUCTURES, the Oracle Application Object Library table that defines key flexfield structures. The package reads this table to resolve the structure of the item and category key flexfields, which is necessary to correctly segment and pad the concatenated flexfield values returned by the C_FLEXPAD_ITEMFORMULA and C_FLEXPAD_CATFORMULA functions. The identifier l_item_flex_num is a package-level NUMBER variable declared for exactly this purpose: it holds the numeric key flexfield structure identifier for the item flexfield so that padding and segmentation logic can be applied without repeated lookups.

Usage Notes

This package is not a public API and is not referenced by any other documented package; it is a private report-support library. It is invoked exclusively through the associated Oracle Bills of Material concurrent program for the cost roll-up detail report, executed from the Cost Rollup or related manufacturing responsibility menus. Because BEFOREREPORT and AFTERPFORM initialize parameter- and flexfield-related package globals, the report must be run through the concurrent manager rather than by direct PL/SQL invocation. Customizations should not modify the package directly, as it carries a "noship" header status and is overwritten by patches; extensions belong in a separate custom package or a customized XML Publisher template.