Search Results p_to_assembly




Overview

WIP_WIPREDAT_XMLP_PKG is the generated PL/SQL package body that supports the Oracle EBS concurrent program report "WIP Redeem Assembly" (short name WIPREDAT). It is an XML Publisher (BI Publisher) based report in the Discrete Manufacturing module, executed against the Work in Process (WIP) and Work in Process Scheduling schemas. The package's primary purpose is to assemble and return dynamically constructed SQL WHERE-clause fragments that are appended to the report's main query so that user-entered concurrent program parameters correctly filter the result set. Typical report output lists redeemed or completed assemblies within a specified assembly naming range, production line range, start date range, and job status range.

The package carries no business logic for WIP transactions itself; instead it performs the classic Oracle Reports/XMLP role of "before report" initialization and "parameter limiter" construction. Note the header revision (120.1, 2008/01/31) and the "noship" designation, indicating a factory-shipped, non-modified seed object. The package is almost certainly still delivered and used in both 12.1.1 and 12.2.2, with no functional change to its body across those releases.

Key Procedures and Functions

The ETRM metadata documents eight procedures/functions. Their purposes are:

  • BEFOREREPORT — The report initialization hook fired before report execution. It retrieves the concurrent request ID via FND_GLOBAL.CONC_REQUEST_ID into the global P_CONC_REQUEST_ID so downstream report objects and XML templates can reference the parent request. The former SRW user exits for FND SRWINIT and flexfield SQL are commented out.
  • AFTERREPORT — The complementary teardown hook, restoring the environment after report completion. The FND SRWEXIT user exit is commented out in this revision.
  • LINE_LIMITER — Returns a character fragment that restricts the report by production line code. It filters on WL.LINE_CODE between P_FROM_LINE and P_TO_LINE, or applies an open-ended upper/lower bound when only one of the two is supplied.
  • ASSEMBLY_LIMITER — Returns the fragment that restricts results by assembly (WIP entity) range. It filters WE.WIP_ENTITY_NAME between P_FROM_ASSEMBLY and P_TO_ASSEMBLY, with the same one-sided bound logic.
  • FUS_DATE_LIMITER — Returns the fragment restricting the report by first-used start date. It filters TRUNC(WRS.FIRST_U...) (truncated first use date) between P_FROM_START_DATE and P_TO_START_DATE.
  • C_STATUS_LIMITERFORMULA — Returns the date/status limiter formula fragment, typically referencing P_FROM_START_DATE, P_TO_START_DATE, or status parameters.
  • GET_PRECISION — Returns a numeric precision factor used by the XML template to format quantity or amount columns consistently.
  • AFTERPFORM — Post-parameter-form processing hook, invoked after the concurrent program's parameter form is submitted.

The functions named *_LIMITER all return concatenated SQL text, relying on the calling report layout to inject them into the main query. Note that these fragments are string-concatenated with the user's parameter values, so parameter values must be validated by the calling report to avoid SQL injection.

Tables Accessed

The metadata does not enumerate table references explicitly, but the source fragments reference the following APPS synonyms/aliases through the generated report query: WE (WIP_ENTITIES — the assembly/job header), WL (WIP_LINES — production line definitions), WRS (likely a WIP redeem/scheduling view such as WIP_REQUIREMENT_OPERATIONS or a discrete redeem assembly view), and MLOC (MTL_ITEM_LOCATIONS, referenced by the commented flexfield SQL). These are read-only accesses; the package performs no DML.

Usage Notes

This package is invoked exclusively by the "WIP Redeem Assembly" (WIPREDAT) concurrent report. It is registered as the XML Publisher data source program; users submit it from the Discrete Manufacturing responsibility, providing parameters such as Assembly range, Line range, Start Date range, and status. The parameter limiter functions are called from within the report's SQL definition or from the XML template where the LIMITER formulas are referenced.

Because the package body is a generated, seeded object, it should not be modified directly. Any custom requirement to extend the filter logic should be handled by cloning the report definition. The user's search term "p_to_assembly" corresponds directly to the ASSEMBLY_LIMITER function, where the parameter supplies the upper bound of the WIP entity name range in the WIP_ENTITIES.WIP_ENTITY_NAME BETWEEN predicate.