Search Results gme_complete_batch_pvt




Overview

APPS.GME_COMPLETE_BATCH_PVT is a private PL/SQL package in Oracle EBS Process Manufacturing (OPM/Process Manufacturing) that implements the batch completion logic for the GME (Process Execution) module. The package declares AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema rather than the defining schema, and it carries the "PVT" suffix, indicating it is an internal, non-public API intended to be invoked by other OPM packages rather than by external customers directly.

Its central business function is to finalize a production batch: validating that a batch is eligible for completion, processing consumed and yielded materials, generating inventory transactions that reflect actual consumption and production, and returning an updated batch header record with any material exceptions. In effect, this package drives the transactional close of a work-in-process batch in OPM, converting planned material activity into recorded inventory movements.

Key Procedures and Functions

The ETRM metadata documents six procedures:

  • COMPLETE_BATCH — The top-level driver procedure. It accepts a batch header record, an exception material table (in/out), and returns an updated batch header record plus a return status. It orchestrates the completion of an entire batch.
  • PROCESS_MATERIAL — Handles an individual material detail record, taking a yield indicator, transaction date, and inventory update indicator, and returning material exceptions and status. It is the per-line processing routine invoked during batch completion.
  • YIELD_MATERIAL — Processes yielded (produced) material for a material detail record, applying the yield quantity, transaction date, item record, and an unconsumed-forcing flag, returning the actual quantity and status.
  • BUILD_AND_CREATE_TRANSACTION — Constructs and creates the inventory transaction for a given material detail and pending product lot, using subinventory, locator, transaction date, yield quantity, revision, and secondary UOM, returning actual quantity and status.
  • CONSTR_MMTI — Builds the MTL_TRANSACTIONS_INTERFACE record and associated transaction lot interface rows for a material detail, returning the interface record, lot table, secondary and detail quantities, and status.
  • VALIDATE_BATCH_FOR_COMPLETE — Performs pre-completion validation on a batch to confirm it is eligible for completion before transactional processing proceeds.

Tables Accessed

The package reads and writes the following documented tables via APPS synonyms:

Usage Notes

Because this package is classified as PVT, it is not intended for direct customer invocation. The metadata notes it is referenced by five other packages, which comprise its supported call stack — typically the public OPM batch completion APIs and concurrent programs. In practice, batch completion is triggered from the OPM Batch form (such as the Complete Batch action) or from concurrent programs that process batch close and inventory transaction feeds.

Custom code should not call GME_COMPLETE_BATCH_PVT directly, since Oracle reserves the right to change private signatures without notice. Developers requiring programmatic batch completion should invoke the supported public API that wraps this package. When the package constructs transaction records, it populates MTL_TRANSACTIONS_INTERFACE, meaning a subsequent transaction manager concurrent program is required to finalize the inventory movements. The use of AUTHID CURRENT_USER also means that the effective privileges governing table access derive from the calling session, reinforcing the need to invoke this package only through Oracle's supported calling chain. The header comment (120.4, dated 2005) indicates the implementation has remained stable across the 12.1.1 and 12.2.2 releases.