Search Results revert_batch




Overview

The APPS.GME_REVERT_BATCH_PVT package is a private (PVT) PL/SQL API within the Oracle E-Business Suite Process Manufacturing (OPM) module. Its purpose is to reverse, or "revert," batch transactions that have already been posted, staged, or otherwise recorded against a production batch. In process manufacturing workflows, batches are created, released, and executed against formulation and routing definitions, accumulating material consumption, step activity, and item issue records. When such activity must be undone — due to erroneous entries, reversed production runs, or corrections to shop floor data — the revert operations consolidate the logic that removes or negates the affected batch header, step, and material detail records.

The package is classified as PVT, indicating it is an internal implementation package rather than a formally published public API. It is referenced by two other packages in the OPM schema, which suggests it is invoked as part of a broader batch-processing or batch-maintenance transaction flow rather than being called directly by end users. Its design centers on single-batch granularity, allowing reversion at either the header level or the individual line level.

Key Procedures and Functions

The package exposes two documented procedures, both of which use NOCOPY OUT parameters and a return status to communicate outcome. Neither returns a value as a function; both operate by side effect and by populating out parameters.

  • REVERT_BATCH — Performs the reversion operation at the batch header level. It accepts an input batch header record and returns an updated batch header record along with a return status indicator, allowing the caller to determine whether the reversion succeeded. This procedure is the primary entry point for reversing an entire batch.
  • REVERT_LINE — Performs reversion at the line level. It accepts the batch header record, a material detail record, and a batch step record as inputs, and returns a status indicator. This procedure supports granular reversal of individual material or step lines within a batch, rather than the batch as a whole.

Tables Accessed

The package references the following tables through APPS synonyms, all of which are core to the OPM batch data model:

  • GME_BATCH_HEADER — The principal batch definition table. Both procedures receive and return rows of this table, reflecting its central role in identifying the batch being reverted.
  • GME_BATCH_STEPS — Stores the batch steps associated with a batch. Reversion logic reads step records to determine which step activity must be undone.
  • GME_MATERIAL_DETAILS — Holds material consumption and detail records for a batch. REVERT_LINE operates directly against a material details row.
  • GME_BATCH_STEP_ITEMS — Stores item-level detail within batch steps, supporting the reversion of step item associations.
  • MTL_SYSTEM_ITEMS_B — The inventory item master. It supplies item attribute information used during reversion processing.
  • PLITBLM — A PL/SQL index-by or nested table type used in the package's internal processing logic.

Usage Notes

Because GME_REVERT_BATCH_PVT is classified as PVT and is referenced by only two other packages, it is not intended for direct invocation by forms, concurrent programs, or customer extensions. Calls should be routed through the documented public APIs or the packages that already depend on it. Invocation typically occurs during batch maintenance or correction scenarios, where a batch or its individual lines must be reverted within an existing transaction context.

Developers integrating with this scope should observe the NOCOPY OUT parameters and the x_return_status convention, checking the returned status after every call rather than relying on exception propagation alone. Direct use is discouraged in custom code, and any reliance on this package should be validated against the specific OPM patch level, since private packages may change between releases.