Search Results p_from_dept




Overview

WIP_WIPDJDSP_XMLP_PKG is the generated PL/SQL package body that supports the Oracle Work in Process XML Publisher report commonly identified as the Discrete Job Dispatch report (WIPDJDSP). It belongs to the APPS schema and carries the API classification OTHER, indicating it is a report-support package rather than a public integration API. The package encapsulates the report-specific logic that XML Publisher reports require: initialization of the concurrent request context, dynamic construction of WHERE and ORDER BY clauses driven by user-entered report parameters, and formula-style computations used to render derived quantity and status columns in the report output. The package header and body were generated from an Oracle Reports migration (the $Header marker references WIPDJDSPB.pls, dated 2008) and reflect the standard pattern in which a Reports trigger was converted into a database package callable from an XML Publisher data template. The user's search term, p_schedule_group, corresponds to one of the report's selection parameters, which is consumed through the C_LIMITER family of functions that build the runtime WHERE clause applied to the dispatch report query.

Key Procedures and Functions

  • BEFOREREPORT — Performs report-level initialization, most notably assigning the concurrent request ID from FND_GLOBAL.CONC_REQUEST_ID and deriving the quantity precision through WIP_COMMON_XMLP_PKG.GET_PRECISION. It also queries FND_ID_FLEX_STRUCTURES to determine the enabled and frozen MSTK (Item) key flexfield structure number used later for flexfield display. The legacy SRW.USER_EXIT calls for FND SRWINIT and FLEXSQL are retained as commented-out NULL statements.
  • AFTERREPORT — Provides the corresponding teardown hook; the legacy SRW SRWEXIT user exit is likewise commented out, leaving a placeholder that returns TRUE.
  • DYNAMIC_ORDER_BY — Constructs the ORDER BY clause at runtime based on SORT_CODE. Sort codes 7 and 8 produce ordering by first unit start date or last unit completion date respectively, with a common secondary ordering on WIP entity name, operation sequence number, and WIP entity ID.
  • DATE_LIMITER — Builds a date-range predicate applied to either the first unit start date or the last unit completion date, depending on SORT_CODE, using the FROM_DATE and TO_DATE parameters.
  • DEPARTMENT_LIMITER — Generates the WHERE fragment that restricts the report to the department or departments selected by the user.
  • STATUS_LIMITER — Builds the predicate that filters discrete jobs by the selected job status values.
  • C_LIMITER — The consolidated limiter function that assembles the individual limiter fragments into a single WHERE clause. This is the segment that incorporates the schedule group (p_schedule_group) selection into the report query.
  • C_QUANTITY_IN_PREVFORMULA — Formula column that computes the quantity previously moved or completed at the operation, used to derive remaining quantities in the dispatch listing.
  • QUANTITY_REMAININGFORMULA — Formula column that derives the quantity still remaining at the operation by subtracting prior activity from the operation quantity.
  • QUANTITY_REM_IN_PREV_P — Companion formula that calculates the remaining quantity in the prior operation for the same job, supporting comparison of adjacent operation progress.
  • AFTERPFORM — Post-formula processing hook that executes after the report's formula columns have been evaluated, used for any final adjustments required before output.

Tables Accessed

  • FND_ID_FLEX_STRUCTURES — Read in BEFOREREPORT to identify the enabled, frozen MSTK flexfield structure. This drives item flexfield rendering on the report and ensures the correct structure version is used when the report displays item information.
  • WIP_OPERATIONS — The primary transactional source referenced by the report's underlying query. It supplies operation-level detail such as operation sequence number, quantities moved, quantities completed, first unit start dates, and last unit completion dates, all of which feed the limiter, ordering, and formula logic described above.

Usage Notes

WIP_WIPDJDSP_XMLP_PKG is not intended for direct invocation by external or custom code. It is referenced by zero other packages in the ETRM metadata, confirming its role as a leaf-level report support unit. It is executed exclusively in the context of the Discrete Job Dispatch XML Publisher concurrent program, where the XML Publisher engine calls BEFOREREPORT before data retrieval, invokes the limiter and formula functions while executing the data template query, and calls AFTERPFORM and AFTERREPORT at the end of processing. The functions return PL/SQL fragments rather than bound variables in several cases, a pattern inherited from the original Oracle Reports implementation; this means the package's output is sensitive to the data types and formatting of the report parameters passed in, and any modification requires regression testing of the concurrent program. Organizations customizing the underlying query or the report parameters, including p_schedule_group, should treat this package as read-only and place customizations in a cloned concurrent program and template rather than editing the delivered package body, since it is a shipped object and may be overwritten during patching or upgrade to 12.2.2.