Search Results update_batch_resources




Overview

GMP_WPS_WRITER is an Oracle EBS Process Manufacturing (OPM) PL/SQL package owned by APPS and classified as OTHER in the ETRM repository. Its business purpose is to persist the results produced by the Work-in-Process Scheduler (WPS) after scheduling calculations have completed. In the OPM batch manufacturing model, a batch consists of a header, one or more steps, activities within each step, and consumption of resources and charges. The optimizer computes new start dates, end dates, usage quantities, and sequence-dependent values; GMP_WPS_WRITER is the component responsible for writing those computed values back into the GME_* scheduling tables. The package declares AUTHID CURRENT_USER and defines a NUMBER_TBL_TYPE PL/SQL associative array indexed by BINARY_INTEGER, which is used to pass arrays of values for multi-row steps, resources, and activities in a single call rather than row by row. A shared token, v_doc_prod VARCHAR2(4) := 'PROD', identifies the document type used in the update logic. The header comment in the source ($Header: GMPWPSWS.pls 120.1 2005/08/17) indicates the file has been stable since release 12.0 and carries no ship-level version tag, which is consistent with its role as an internal scheduler writer rather than a publicly versioned API.

Key Procedures and Functions

  • UPDATE_BATCH_HEADER — Updates the batch header record after WPS scheduling completes, applying revised start and end dates, last-update information, and the scheduling horizon for the batch.
  • UPDATE_BATCH_STEPS — Updates the batch step rows using array inputs for step numbers, step identifiers, start/end dates, last-update values, and row count, so that an entire set of steps is refreshed in one invocation.
  • UPDATE_BATCH_ACTIVITIES — Updates individual batch step activities, including activity start/end dates, usage of measure, and last-update audit fields.
  • UPDATE_BATCH_RESOURCES — Updates the batch step resource rows, applying resource usage, resource and setup identifiers, start/end dates, sequence-dependent usage, and the scheduling horizon. This is the routine most directly associated with the user's search term, and it is the resource-level counterpart to the step and activity writers.
  • UPDATE_RESOURCE_TRANSACTIONS — Writes resource transaction records resulting from scheduling, feeding the resource transaction table used by costing and inventory.
  • UPDATE_OPERATION_RESOURCES — Updates operation-level resource information derived from the scheduled batch operations.
  • LOCK_BATCH_DETAILS — Acquires locks on the batch detail rows before the writer updates them, preventing concurrent modification during the write-back phase.
  • LOG_MESSAGE — Records diagnostic or status messages produced during the write process, supporting troubleshooting of scheduler runs.
  • GET_WPS_ATR — Retrieves WPS attribute values used by the writer logic.
  • GET_WPS_ONHAND — Retrieves WPS on-hand information, supplying availability data to the update routines.

Tables Accessed

The package reads and writes the core OPM scheduling tables through APPS synonyms. GME_BATCH_HEADER, GME_BATCH_STEPS, GME_BATCH_STEP_ACTIVITIES, GME_BATCH_STEP_CHARGES, and GME_BATCH_STEP_RESOURCES hold the batch definition hierarchy that the update procedures modify. GME_MATERIAL_DETAILS and GME_RESOURCE_TXNS capture material and resource transaction detail generated by scheduling, while CR_RSRC_DTL provides the resource detail master used to validate and resolve resource identifiers. MTL_UNITS_OF_MEASURE supplies unit-of-measure validation for the usage values passed into the resource and activity updates.

Usage Notes

GMP_WPS_WRITER is not a user-facing API. It is invoked internally by the WPS scheduling process, after the optimizer has computed new timing and usage values and before results are presented in the OPM batch forms. The package is referenced by zero other packages in the ETRM inventory, confirming that it is a terminal writer rather than a shared utility. Custom code that must reproduce scheduler output should call these procedures rather than updating the GME_* tables directly, because LOCK_BATCH_DETAILS establishes the locking protocol and the array parameters preserve atomic multi-row updates. In Oracle EBS 12.1.1 and 12.2.2 the package resides in the APPS schema and executes with invoker's rights, so the calling session must itself hold the necessary privileges on the underlying GME and CR tables. Typical invocation paths are the Process Execution and OPM batch scheduling concurrent programs; direct calls are appropriate only for controlled maintenance or scheduler re-run scenarios. Because the package predates the 12.2 online patching model and carries no editioning annotations in the source, it should be treated as an internal implementation object whose signature is not guaranteed as a public interface.