Search Results close_batch




Overview

The APPS.GME_CLOSE_BATCH_PVT package is a private (PVT-classified) PL/SQL API within the Oracle E-Business Suite Process Manufacturing (OPM) module. Its principal responsibility is to close a production batch — the terminal state transition in the batch lifecycle — after all material consumption, resource usage, and yield activities have been recorded. Because the package is declared AUTHID CURRENT_USER, it executes with the privileges of the invoking schema rather than the defining owner, a common convention for internal process-manufacturing utilities that must respect the caller's security context. The package orchestrates validation, history archiving, step retrieval, and transactional cleanup so that a batch moves cleanly from a released or completed state into a closed state, at which point no further material or resource movements may be posted against it.

Key Procedures and Functions

  • close_batch — The primary public procedure. It accepts a batch header record and returns an updated batch header record along with a return status indicator. This is the main entry point that drives the closure workflow, coordinating the supporting functions and procedures to finalize the batch.
  • create_history — A function that returns a Boolean result, responsible for generating the historical record of the batch. It preserves the batch's final state for audit and reporting purposes before the operational data is finalized.
  • check_close_date — A Boolean validation function that verifies whether the batch's close date is permissible relative to accounting periods, open inventory periods, and related date controls. This guards against closing a batch into a closed or restricted accounting period.
  • fetch_batch_steps — A procedure that retrieves the step-level detail records for a given batch and batch step, populating an output collection typed against gme_batch_steps%ROWTYPE and returning a status indicator. The package also declares a step_details_tab associative array type keyed by BINARY_INTEGER to hold these rows in memory.

Tables Accessed

The package reads and writes across the core batch, material, and transaction tables, accessible through APPS synonyms in 12.1.1 and 12.2.2:

Usage Notes

As a PVT-classified package, GME_CLOSE_BATCH_PVT is not intended as a public integration API and should not be invoked directly by customer code. It is called internally by three other packages within the process manufacturing stack. Typical invocation originates from the OPM batch-close form and from concurrent programs that process batch closure in bulk. Customizations requiring this behavior should call the supported public wrapper rather than this private package, because its signature (evidenced by the $Header revision dated 2005) has remained stable but is not guaranteed across patch levels. When troubleshooting close_batch errors, verify accounting period status and step dependencies first, since check_close_date and the step-fetch logic are the most common points of failure.