Results for “c_currency_codeformula”
50+ results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.BOM_CSTRPCGW_XMLP_PKG is the generated PL/SQL package body that backs the Oracle E-Business Suite concurrent program report "Cost Reporting: Cost Group Accounting / WMS Cost Report" (internally associated with the CSTRPCGW report and its XML Publisher / Oracle Reports definition). In Oracle EBS 12.1.1 and 12.2.2 this package follows the standard report integration pattern, in which Oracle Reports or the concurrent manager invokes a wrapper package whose functions execute at well-defined trigger points: before the report is launched and after it completes. The package is classified as an "OTHER" API in the ETRM repository, meaning it is not a supported public interface but rather an internal implementation detail of the report. Its responsibilities are limited to preparing runtime context, validating the organization against WMS and Project Manufacturing (PJM) cost group accounting settings, computing the ORDER BY clause for the report query, and formatting currency display values.
Key Procedures and Functions
- BEFOREREPORT — Executes the pre-report logic. It queries MTL_PARAMETERS to determine whether the organization supplied in P_ORG_ID is WMS-enabled (WMS_ENABLED_FLAG = 'Y') or configured for project cost group accounting (COST_GROUP_ACCOUNTING = 1 and PROJECT_REFERENCE_ENABLED = 1). If neither condition is met, it raises the BOM message CST_WMS_ORG_REPORT_ONLY, indicating the report is intended only for WMS or PJM organizations. It also derives the report sort order (C_ORDER_BY) from the P_SORT_ID parameter, initializes P_CONC_REQUEST_ID via FND_GLOBAL.CONC_REQUEST_ID, formats the close date into LP_CLOSE_DATE, and returns TRUE.
- AFTERREPORT — Executes the post-report logic. In this package body its body is limited to the standard cleanup exit (the SRWEXIT call is commented out) and it unconditionally returns TRUE. It serves as the conventional teardown hook for the report lifecycle.
- C_CURRENCY_CODEFORMULA — A formatting helper that accepts a currency code and returns it wrapped in parentheses, e.g., "(USD)". This is the function targeted by the search term "c_currency_codeformula". It is used as a Oracle Reports formula column that decorates the currency code with parentheses for display in the report output, rather than performing any database lookup or conversion.
Tables Accessed
The only documented table referenced is MTL_PARAMETERS, accessed through the APPS synonym. The package performs two scalar count queries against this table for the organization specified in P_ORG_ID: one filtering on WMS_ENABLED_FLAG and one filtering on the project cost group accounting columns. These reads determine whether the current organization qualifies for the report and drive the CST_WMS_ORG_REPORT_ONLY diagnostic. MTL_PARAMETERS is the standard inventory organization definition table, making it the natural source for organization-level costing, WMS, and project manufacturing attributes.
Usage Notes
This package is not called directly by end users or custom code; it is invoked by the Oracle Reports runtime and the concurrent manager when the associated cost report is submitted. In 12.1.1 the report is executed through the classic Oracle Reports integration, and in 12.2.2 the same logic applies even where the report output is rendered through XML Publisher. The BEFOREREPORT function depends on the bind parameters P_ORG_ID, P_SORT_ID, and P_CLOSE_DATE being populated by the concurrent program definition. Because the ETRM metadata records that this package is referenced by zero other packages, it should be treated as a leaf implementation object. Customizations should not modify this generated package body, since patches and upgrades regenerate XMLP_PKG packages; instead, extensions should target the underlying report definition or the concurrent program parameters. The C_CURRENCY_CODEFORMULA function in particular is a display-only formula and has no business logic that warrants reuse.