Search Results validate_batch_header
Overview
GMP_WPS_WRITER is an Oracle E-Business Suite PL/SQL package body owned by APPS and classified as an OTHER API within the ETRM repository. It belongs to the Oracle Process Manufacturing (OPM) scheduling component and functions as the persistence layer for the Waterfall Planning and Scheduling (WPS) engine. When the WPS scheduling engine completes its in-memory computation for a production batch, the results must be written back to the OPM and WIP transaction tables. GMP_WPS_WRITER performs this write-back, persisting recalculated start and completion dates, finite-scheduled indicators, step and activity timings, resource consumption, and resource transaction records.
The package is tightly coupled to the WPS scheduling process rather than serving as a general-purpose transactional API. Its procedures are invoked internally by the scheduling engine after optimization, and it holds a private package-level variable, v_cp_enabled, used to track constraint-planning enablement during execution.
Key Procedures and Functions
The package exposes ten documented procedures and functions:
- UPDATE_BATCH_HEADER — Updates the batch plan start and end dates on GME_BATCH_HEADER after the scheduling engine completes. It validates the batch through an internal cursor named
validate_batch_header, which selects batch status and last update date. Return status codes indicate validation outcomes: -1 when the batch is not found, -2 when the record was modified by another session (optimistic locking conflict), and 0 for normal completion. When the batch status equals 1, it sets plan_start_date, plan_cmplt_date, and finite_scheduled_ind and stamps audit columns. - UPDATE_BATCH_STEPS — Writes scheduled step-level timing results back to the batch step records.
- UPDATE_BATCH_ACTIVITIES — Persists activity-level scheduling results within each batch step.
- UPDATE_BATCH_RESOURCES — Updates resource assignments and consumption at the batch step level.
- UPDATE_RESOURCE_TRANSACTIONS — Writes resource transaction records generated by the scheduling run.
- UPDATE_OPERATION_RESOURCES — Maintains operation-level resource detail records.
- LOCK_BATCH_DETAILS — Acquires locks on batch detail rows to serialize concurrent scheduling writes.
- LOG_MESSAGE — Records diagnostic and error messages emitted during the write-back process.
- GET_WPS_ATR — Retrieves a WPS attribute value used by the scheduling engine.
- GET_WPS_ONHAND — Returns on-hand quantity information for WPS scheduling calculations.
Tables Accessed
The package reads and writes the following tables through APPS synonyms:
- GME_BATCH_HEADER — The primary batch record; read for validation and updated with plan dates and scheduling indicators.
- GME_BATCH_STEPS — Batch step definitions, updated with scheduled timings.
- GME_BATCH_STEP_ACTIVITIES — Activity-level records within steps.
- GME_BATCH_STEP_CHARGES — Charge (input/output) records associated with steps.
- GME_BATCH_STEP_RESOURCES — Resource requirements per batch step.
- GME_RESOURCE_TXNS — Resource transaction records produced by scheduling.
- GME_MATERIAL_DETAILS — Material detail lines associated with batches.
- CR_RSRC_DTL — Capacity/resource detail used for constraint calculations.
- MTL_UNITS_OF_MEASURE — Unit of measure validation and conversion reference.
Usage Notes
GMP_WPS_WRITER is not a user-invoked API. It is called programmatically by the OPM WPS scheduling engine after the optimization run completes, typically from a concurrent program that executes the scheduler. Customers and integrators should treat it as internal; the documented ETRM classification is OTHER, and it is referenced by zero other packages, confirming its role as a terminal write-back layer rather than a reusable service.
The validate_batch_header cursor and the associated return_status codes are the recommended points of interest for troubleshooting. A return_status of -2 signals that the batch header was modified between scheduling and write-back, indicating a concurrent-update conflict. A return of -1 indicates the batch no longer exists. Versions 12.1.1 and 12.2.2 share this behavior; the header comment history notes that material update logic was removed at R12.0, so earlier behavior involving material detail writes should not be expected in current releases. Direct custom calls to this package are not supported and risk data inconsistency with the scheduling engine.
-
APPS.JAI_ETCS_PKG SQL Statements
12.2.2
-
PACKAGE BODY: APPS.GMP_WPS_WRITER
12.2.2
-
PACKAGE BODY: APPS.GMP_WPS_WRITER
12.1.1
-
PACKAGE: APPS.JAI_ETCS_PKG
12.2.2
-
APPS.GMP_WPS_WRITER SQL Statements
12.2.2
-
APPS.GMP_WPS_WRITER SQL Statements
12.1.1
-
APPS.GMP_WPS_WRITER dependencies on WIP_DATETIMES
12.2.2
-
APPS.JAI_AP_TDS_ETDS_PKG SQL Statements
12.1.1
-
PACKAGE: APPS.JAI_AP_TDS_ETDS_PKG
12.1.1
-
APPS.GMP_WPS_WRITER dependencies on WIP_DATETIMES
12.1.1
-
PACKAGE: APPS.JAI_AP_TDS_ETDS_PKG
12.2.2
-
PACKAGE BODY: APPS.PAY_BALANCE_UPLOAD
12.2.2
-
PACKAGE BODY: APPS.PAY_BALANCE_UPLOAD
12.1.1
-
PACKAGE BODY: APPS.JAI_ETCS_PKG
12.2.2
-
PACKAGE BODY: APPS.JAI_ETCS_PKG
12.1.1
-
PACKAGE BODY: APPS.JAI_AP_TDS_ETDS_PKG
12.1.1
-
APPS.JAI_AP_TDS_ETDS_PKG SQL Statements
12.2.2
-
APPS.PAY_BALANCE_UPLOAD dependencies on PAY_BALANCE_UPLOAD
12.1.1
-
APPS.PAY_BALANCE_UPLOAD dependencies on PAY_BALANCE_UPLOAD
12.2.2
-
PACKAGE BODY: APPS.JAI_AP_TDS_ETDS_PKG
12.2.2
-
APPS.PAY_BALANCE_UPLOAD dependencies on HR_UTILITY
12.1.1
-
APPS.PAY_BALANCE_UPLOAD dependencies on HR_UTILITY
12.2.2