Search Results gme_resource_engine_pvt




Overview

GME_RESOURCE_ENGINE_PVT is an internal (private, API classification PVT) PL/SQL package body owned by the APPS schema in Oracle E-Business Suite Process Manufacturing. It implements the resource transaction engine that drives resource consumption and generation for process manufacturing batches. In the context of Oracle EBS 12.1.1 and 12.2.2, this package is the workhorse behind the resource side of the transaction engine: when a batch is released, started, completed, or reversed, the engine must create, adjust, consolidate, and validate resource transactions against the batch step resources defined in the recipe. GME_RESOURCE_ENGINE_PVT encapsulates that logic, exposing procedurally the operations that the public transaction engine (GMI_TRANS_ENGINE_PUB) and related batch step packages rely upon. Because it is a PRIVATE package, it is not intended as a public integration point; it is called by other EBS packages rather than by external applications.

Key Procedures and Functions

The package exposes twenty-three documented procedures and functions. Fetching and detail retrieval are handled by FETCH_ALL_RESOURCES and FETCH_ACTIVE_RESOURCES, with RESOURCE_DTL_PROCESS and BUILD_RESOURCE_TRAN assembling resource detail records for processing. Transaction maintenance is performed by CREATE_RESOURCE_TRANS, UPDATE_RESOURCE_TRANS, and DELETE_RESOURCE_TRANS, while CONSOLIDATE_BATCH_RESOURCES merges resource transaction lines for a batch. Validation routines include VALIDATE_RESOURCE, CHECK_PRIMARY_RESOURCE (which enforces the primary resource rule for a step), GET_RESOURCE_USAGE, and VALIDATE_RSRC_TXN_PARAM, the latter validating input parameters before transaction insertion.

Actual usage is recorded through UPDATE_ACTUAL_RESOURCE_USAGEP and UPDATE_ACTUAL_RESOURCE_USAGE. Incremental and time-based transaction insertion is handled by INSERT_INCR_ACTUAL_RSRC_TXNP and INSERT_INCR_ACTUAL_RSRC_TXN (incremental actual resource transactions) and by INSERT_TIMED_ACTUAL_RSRC_TXNP and INSERT_TIMED_ACTUAL_RSRC_TXN (timed actual resource transactions). Start and completion activity is driven by START_CMPLT_ACTUAL_RSRC_TXNP and START_CMPLT_ACTUAL_RSRC_TXN. The paired "_P" suffixed variants follow the standard EBS convention of a private helper combined with a callable wrapper that performs the actual DML and error handling.

Tables Accessed

The package reads and writes the core process manufacturing batch tables. GME_BATCH_HEADER and GME_BATCH_STEPS provide batch and step context; GME_BATCH_STEP_ACTIVITIES, GME_BATCH_STEP_RESOURCES, and GME_BATCH_STEP_CHARGES supply the activity and resource definitions to be transacted. Consumed and generated resource movements are written to GME_RESOURCE_TXNS, with GME_RESOURCE_TXNS_GTMP used as a global temporary staging table during processing. Resource definitions and details come from CR_RSRC_DTL and CR_RSRC_MST, while GMP_RESOURCE_INSTANCES supplies resource instance information. MTL_TRANSACTION_REASONS provides transaction reason codes, SY_UOMS_MST resolves units of measure, and INV_CONVERT is used for UOM conversions on GMF_LAYERS. DUAL and PLITBLM are used for utility purposes. The package also depends on the DBL layer packages (for example GME_BATCH_HEADER_DBL, GME_BATCH_STEPS_DBL, GME_RESOURCE_TXNS_DBL, and GME_RESOURCE_TXNS_GTMP_DBL) plus utility packages such as GMF_VIB, GME_COMMON_PVT, GME_DEBUG, and GME_TRANS_ENGINE_UTIL.

Usage Notes

GME_RESOURCE_ENGINE_PVT is invoked indirectly. The primary callers are the batch transaction and update packages—GMI_TRANS_ENGINE_PUB, GME_UPDATE_STEP_QTY_PVT, GME_DELETE_BATCH_STEP_PVT, GME_BATCH_STEP_CHG_PVT, and related batch step DBL packages—which trigger resource transaction creation, update, or deletion as a batch advances through its lifecycle. It is therefore executed during forms-driven batch operations such as batch release, start, completion, and step quantity changes, and during any concurrent process or custom extension that calls those public transaction engine routines. Because the package is classified PVT and is not referenced by any database object (only relied upon by other packages), it should not be called directly from custom code. Customizations should instead invoke the public GMI_TRANS_ENGINE_PUB interfaces, allowing GME_RESOURCE_ENGINE_PVT to handle resource transaction generation and validation transparently.