Search Results get_period_id




Overview

GMF_BATCH_VALIDATIONS is an Oracle Process Manufacturing (OPM) package body owned by the APPS schema. Its stated purpose, per the package header, is to contain validations called from Process Execution. The package was created by OPM Development and is documented as a new package delivered under Bug 12432083, with a header revision of 120.5 dated 28-SEP-2011. In Oracle EBS 12.1.1 and 12.2.2, this object resides in the Process Manufacturing application family and participates in the batch lifecycle management performed by Process Execution.

The package addresses a specific control point in the batch cancellation flow. When a user attempts to cancel a released batch, Process Execution invokes this package to determine whether cancellation is permissible or whether the batch must instead be closed. The validation exists because cancelling a batch whose transactions span multiple inventory periods can leave WIP accounting balances improperly zeroed. The package therefore acts as a gatekeeper that protects inventory and WIP accounting integrity during batch cancellation.

Key Procedures and Functions

The ETRM metadata documents a single program unit: CHECK_CANCEL_BATCH.

  • CHECK_CANCEL_BATCH — Evaluates whether a batch may be cancelled. It returns BOOLEAN TRUE if the batch can be cancelled, and FALSE if the batch cannot be cancelled and should instead be closed. Process Execution calls this function when a user attempts to cancel a batch. When TRUE is returned, the batch is cancelled. When FALSE is returned, Process Execution requires the batch to be CLOSED rather than cancelled, and all activity is zeroed out when this code is invoked.

The documented pseudo code for CHECK_CANCEL_BATCH proceeds in three steps: first, check whether transactions exist; if none exist, return TRUE. Second, if transactions exist and fall in different periods, return FALSE — this situation arises when a batch is released and transacted in one period and is cancelled after the period in which the batch was opened has been closed in Inventory. In that case, the WIP account may not be zeroed out for the batch (referencing Bug 12418545 and OPM Fin Bug 12432083). Third, if all transactions are within one period, subsequent checks apply and the function returns TRUE.

Tables Accessed

The package reads the following tables through APPS synonyms:

  • GME_BATCH_HEADER — the batch master record, used to identify the batch under evaluation.
  • GME_RESOURCE_TXNS — resource transactions associated with the batch, used to determine whether activity exists.
  • MTL_MATERIAL_TRANSACTIONS — inventory material transactions, used to establish whether the batch has transacted and in which periods.
  • GMF_PERIOD_STATUSES — period status information used to determine whether transactions fall in different periods and whether periods are closed.
  • GMF_FISCAL_POLICIES — fiscal policy definitions that govern period determination.
  • GMF_CALENDAR_ASSIGNMENTS — calendar assignments used to resolve the applicable accounting calendar and period.

These tables support the multi-period detection logic described in the pseudo code, which is the core of the period-checking behavior associated with the user search term "get_period_id." Period identification is performed indirectly through the fiscal policy, calendar assignment, and period status tables rather than through a publicly documented GET_PERIOD_ID function in this package.

Usage Notes

GMF_BATCH_VALIDATIONS is invoked by Process Execution during the batch cancellation action, typically triggered from the OPM batch maintenance user interface or equivalent transactional flow. It is not documented as a concurrent program entry point and is classified as API classification OTHER, indicating internal use rather than a published open interface. The metadata notes it is referenced by one other package, confirming it is consumed within the OPM batch processing stack rather than called directly by external integrations. Customizations should avoid bypassing this validation, since it enforces the rule that a batch transacted across closed period boundaries must be closed instead of cancelled to preserve WIP and inventory accounting integrity.