Search Results insert_batch_step




Overview

The APPS.GME_INSERT_STEP_PVT package is a private (PVT) PL/SQL API in Oracle EBS Process Manufacturing (OPM). It provides the internal implementation logic used to insert batch step records into the GME (Process Execution) schema. The package operates against the batch execution tables that store the step-by-step routing of a manufacturing batch, including the activities, resources, process parameters, materials, and dependencies that belong to each step. Because the package is classified as PVT, it is not intended as a public, supported interface for external integration; rather, it is a building block called by higher-level OPM APIs and validation routines that assemble a complete batch from a recipe or routing definition.

The header comment ($Header: GMEVINSB.pls 120.6.12010000.1) and version timestamps indicate this implementation was stabilized during the 12.1.x lineage and carried forward into 12.2.2. The package body references the recipe fetch public API (gmd_recipe_fetch_pub) to obtain routing step, activity, resource, process parameter, material, and dependency collections, confirming that its primary role is to persist recipe-derived routing structures into the batch step tables.

Key Procedures and Functions

  • INSERT_BATCH_STEP — The core procedure of the package. It accepts an existing batch header record and a batch step record, performs the insertion of the step and its dependent detail rows, and returns the created step record along with a return status. It internally uses cursors to check for duplicate step numbers within a batch, resolve the organization code, derive standard UOM conversion factors, and validate text codes before committing the step. It also declares collection variables that hold routing steps, operations activities, resources, process parameters, materials, and routing dependencies fetched via gmd_recipe_fetch_pub.
  • CALC_MAX_CAPACITY — A supporting routine that computes the maximum capacity associated with a batch step, typically by evaluating the resources assigned to the step and their available capacity. This value supports capacity validation and scheduling logic within the batch insertion flow.

The presence of only two documented procedures reflects that this is a narrowly scoped internal utility rather than a broad public API.

Tables Accessed

  • GME_BATCH_HEADER — Supplies the batch header context (organization, batch number, status) required to attach new steps to the correct batch.
  • GME_BATCH_STEPS — The primary target of insertion; also queried to detect existing step numbers and avoid duplicates.
  • GME_BATCH_STEP_RESOURCES — Populated with the resources assigned to each inserted step.
  • CR_RSRC_MST — The resource master used to resolve resource attributes and capacity information.
  • GMD_OPERATIONS_B — Provides operation definitions that map routing activities to batch step activities.
  • GME_TEXT_HEADER — Validated via the text code cursor to ensure referenced text exists before association.
  • MTL_PARAMETERS — Resolved to obtain the organization code for the batch's operating unit.
  • MTL_UNITS_OF_MEASURE and MTL_UOM_CONVERSIONS — Used to derive standard conversion rates and UOM classes for quantity handling on the step.
  • PLITBLM — An OPM message/logging table used for diagnostic and error message tracking during processing.

Usage Notes

INSERT_BATCH_STEP is invoked indirectly during batch creation and recipe instantiation flows, most commonly when a batch is generated from a recipe or routing in OPM Batch Maintenance. It is called by parent packages (the metadata notes two referring packages) rather than directly from user-facing forms, and it is not exposed as a standalone concurrent program. Developers should treat it as a private dependency: modifications to its behavior will propagate to any calling API. Diagnostics are governed by the AFLOG_LEVEL profile option, which controls debug output. Custom code should never call this package directly; the supported integration path is through the public OPM batch APIs that reference it.