Search Results cp_whserange
Overview
APPS.GME_GMEBCHPL_XMLP_PKG is the generated PL/SQL package body that supports the Oracle E-Business Suite XML Publisher (BI Publisher) report GMEBCHPL, the Batch Pending / Batch Plan report used within the Process Manufacturing (OPM) module. Reports built on the XML Publisher framework produce two companion generated objects: a specification and a body. The package body encapsulates the report's data-model logic, bind variable handling, and derived column formulas that the report definition references at runtime. Its central responsibility is to build and return SQL fragment strings — most notably range predicates — based on parameters entered by the user, and to supply computed columns that the report layout consumes.
The package is owned by APPS and is classified as an API of type OTHER, indicating it is not part of the public, supported integration surface but rather an internal implementation artifact. It is referenced by no other packages, confirming it is invoked only through the report execution infrastructure rather than by dependent code.
Key Procedures and Functions
The package exposes twenty-one documented functions and procedures. Their roles align with the standard XML Publisher data-model pattern.
- BEFOREREPORT and AFTERREPORT — lifecycle hooks invoked at the start and end of report execution; they initialize or finalize bind variables and report state.
- HEADER — returns the report's header value or header structure used at the top of the output.
- CP_BATCHRANGE_P, CP_WHSERANGE_P, CP_DATERANGE_P — parameter-processor procedures that assemble the WHERE-clause fragments for the batch number, subinventory (warehouse), and date range parameters respectively.
- CF_BATCHRANGEFORMULA and CF_WHSERANGEFORMULA — derived column formulas that construct the batch and warehouse range predicates. CF_BATCHRANGEFORMULA inspects FROMBATCH and TOBATCH; when both are provided it produces an equality (via LPAD to 32 characters) or a BETWEEN clause, when both are null it returns a blank, and when only FROMBATCH is supplied it produces a greater-than-or-equal comparison. This is the function most directly associated with the user's search term "cp_batchrange," which the function populates.
- CF_DATERANGEFORMULA and CF_SORTBYFORMULA — analogous formulas for the date range predicate and for the sort order directive.
- CF_TRANS_QTYFORMULA, CF_SUM_TRANS_QTYFORMULA, CF_SUM_TRANS_QTY2FORMULA, CF_TRANS_QTY2FORMULA, CF_PLAN_QTY2FORMULA, CF_INV_PLAN_QTYFORMULA, CF_ACTUAL_START_DATEFORMULA — derived columns returning absolute or formatted quantity and date values for transaction quantities, plan quantities, and the actual start date.
- CF_CONTEXTORGFORMULA and SORTRETCFFORMULA — return organization context and sort criteria values, respectively, supporting multi-organization and ordering requirements.
Tables Accessed
The package references only two objects through APPS synonyms: DUAL and MTL_PARAMETERS. DUAL is used inside functions such as CF_TRANS_QTYFORMULA and CF_SUM_TRANS_QTYFORMULA to apply the ABS function and return the result into a local variable — a pattern typical of XML Publisher formula functions. MTL_PARAMETERS, the inventory organization parameters table, is queried during report initialization to derive organization-level defaults such as the default subinventory, thereby populating the bind variables that later drive the range predicate formulas.
Usage Notes
GME_GMEBCHPL_XMLP_PKG is not invoked directly by custom PL/SQL. It is executed by the XML Publisher/BIP engine when the GMEBCHPL batch report concurrent program is run, most commonly submitted from the Oracle Process Manufacturing menu or the standard concurrent programs form. Parameters such as FROMBATCH, TOBATCH, FROMWHSE, TOWHSE, and the date parameters are supplied in the report parameter window; the package transforms them into SQL fragments and bind values that the report's data model — not the package itself — executes against the underlying batch and transaction tables. Because the package body is a generated artifact (header revision 120.1, dated 2008), it may be regenerated during patching, so any customization should be applied at the report definition or a separate custom package rather than by editing this body in place. Its behavior is consistent across EBS 12.1.1 and 12.2.2, as the XML Publisher data-model framework is unchanged between those releases.