Search Results sub_usage




Overview

The APPS.WIP_RES_USAGE_SUBSTITUTIONS package body supports resource usage substitution processing within Oracle Work in Process (WIP). Resource usage substitutions allow a manufacturing transaction to record a resource that differs from the resource originally defined on the work order, capturing the change through a substitution type such as add. This package provides the server-side logic that validates and applies those substitutions against the WIP job details interface, which is the staging area for work order and resource transactions loaded from external sources or the shop floor.

The package header carries the version marker $Header: wiprustb.pls 115.6 2002/11/29 ... $, indicating it is a relatively stable, legacy component of the WIP transaction stack. In Oracle EBS 12.1.1 and 12.2.2, it operates as an internal utility invoked during the validation phase of the WIP job details interface load, rather than as a publicly documented open interface. Its classification in ETRM is OTHER, and it is referenced by zero other packages, confirming that it functions as a leaf-level helper rather than a shared library.

Key Procedures and Functions

Two procedures are documented:

  • SUBSTITUTION_RES_USAGES — The driver procedure. It opens a cursor over WIP_JOB_DTLS_INTERFACE to identify pending resource-usage substitution rows for a given group, work order, and organization, filtering on the validation process phase, a running status, the resource-usage load type, and an add substitution type. It orders the rows by operation sequence and resource sequence, then iterates over them, delegating the actual per-row processing to SUB_USAGE.
  • SUB_USAGE — The per-row worker procedure. It receives the group, entity, organization, operation sequence, and resource sequence, and processes a single substitution. Internally it queries the usage records for that specific operation and resource, gathering job attributes such as start and completion dates, assigned units, audit columns, and the substitution type, so that the substitution can be applied consistently.

Both procedures follow the standard ETRM error-reporting convention, returning an error code, error message, and return status through their output parameters rather than raising unhandled exceptions.

Tables Accessed

  • WIP_JOB_DTLS_INTERFACE — The primary staging table read by the driver cursor. It holds interface rows awaiting validation, including operation and resource sequence numbers, process phase and status, load type, and substitution type. The package selects only rows in the validation/running state with the resource-usage load type and an add substitution type.
  • WIP_OPERATION_RESOURCE_USAGE — The destination table for resource usage information. The SUB_USAGE logic refers to usage data (the excerpt aliases a WIP usage source) that ultimately resolves to this resource usage entity, where operation-level resource assignments and their substitution details are maintained for the work order.

Together these tables represent the inbound interface layer and the persistent WIP resource usage layer, with the package acting as the bridge between them.

Usage Notes

This package is invoked during validation of the WIP job details interface, typically from a concurrent program or an internal transaction manager that processes staged interface rows. It is not intended for direct invocation by custom code and exposes no documented open interface signature. In 12.1.1 and 12.2.2 the file may reside under the $WIP_TOP or $AP_TOP product directories depending on patch level, but the package specification and behavior remain consistent. Developers debugging substitution failures should inspect WIP_JOB_DTLS_INTERFACE rows for the affected group, confirming that the process phase is validation, the status is running, and the substitution type is add, since rows failing these predicates are silently skipped by the driver cursor.