Search Results insert_batch_header
Overview
The APPS.MIGRATE_BATCH package is a PL/SQL migration utility belonging to the Oracle Process Manufacturing (OPM) Process Execution module. Its source file, GMEMIGBS.pls, was authored in January 2001 by Shrikant Nene and has been maintained through several revisions, most notably Bug 4249832 (June 2005), which removed hard-coded schema references in compliance with Global Standards for Coding Conventions. The package is classified as an "OTHER" API within ETRM documentation, meaning it is not part of the officially supported public API surface, but rather an internal migration/conversion utility.
The package's business purpose is to migrate batch data from legacy or external source structures into the OPM Process Execution tables. It accepts batch entity rows one at a time, transforms and validates the data, and writes the resulting batch header, material details, and batch step records into the appropriate GME and PM tables. The package is declared AUTHID CURRENT_USER, so it executes with the privileges of the calling schema. It also maintains a global variable p_default_loct, populated from the IC$DEFAULT_LOCT profile option, which identifies the default inventory location used during migration.
Key Procedures and Functions
The package exposes 54 documented procedures and functions. The principal entry point is RUN, which drives the overall migration by iterating over source batch records and invoking the remainder of the package. INITIALIZE_MIGRATION acts as a constructor, initializing global variables — including the path to the GME validation log file referenced by the g_location global — and avoiding repeated cursor calls.
The INSERT_BATCH_HEADER procedure inserts a new batch header record, while INSERT_MATERIAL_DETAILS, INSERT_BATCH_STEPS, and INSERT_BATCH_STEP_DTLS insert the corresponding material and step-level detail rows. A set of GET_* functions retrieve supporting data: GET_OPRN_ID, GET_BATCHSTEP_ID, and GET_PROCESS_QTY_UOM resolve identifiers and units of measure; GET_ACTUAL_COST_IND, GET_GL_POSTED_IND, and GET_POC_DATA_IND return indicator flags; GET_REF_UOM returns a reference UOM; and GET_WIP_PLANNED_QTY, GET_PLANNED_QTY, GET_ACTUAL_QTY, GET_ACTUAL_ACTIVITY_FACTOR, GET_PLANNED_USAGE, and GET_ACTUAL_USAGE derive quantity and usage values for the migration. CHECK_WIP_BATCHES validates work-in-process batches. Earlier revisions of the package also contained SPLIT_TRANS_LINE and IS_REVERSAL routines for handling completed default lot lines and reversal transactions, and a private INSERT_MESSAGE procedure for writing error messages.
Tables Accessed
The package reads and writes a defined set of OPM tables via APPS synonyms. Batch and step data are persisted to GME_BATCH_HEADER, GME_BATCH_STEPS, and GME_BATCH_STEP_ACTIVITIES. Master and routing data are read from IC_ITEM_MST, PS_WHSE_EFF, FM_OPRN_MST, PM_OPRN_DTL, and PM_ROUT_DTL. Costing information is derived from CM_ACST_LED and CM_CMPT_DTL, with resource detail sourced from CR_RSRC_DTL. Pending inventory transactions are recorded in IC_TRAN_PND, and surrogate transaction identifiers come from the sequence GEM5_TRANS_ID_S. Backup tables PM_BTCH_HDR_BAK and PM_MATL_DTL_BAK support the migration's rollback and audit posture.
Usage Notes
MIGRATE_BATCH is a legacy migration utility rather than a general-purpose transactional API. It is not referenced by any other documented package, indicating it is invoked directly — typically from custom migration scripts, data conversion programs, or an OPM migration form — during initial implementations or upgrades into 12.1.1 / 12.2.2. Because it is classified as OTHER and writes directly to base tables, use should be limited to controlled conversion windows, with validation log output reviewed and backup tables preserved. Its AUTHID CURRENT_USER declaration means the executing schema must hold the necessary object privileges on the referenced GME, PM, IC, CM, and CR tables.
-
PACKAGE: APPS.MIGRATE_BATCH
12.2.2
-
APPS.MIGRATE_BATCH SQL Statements
12.1.1
-
APPS.MIGRATE_BATCH SQL Statements
12.2.2
-
PACKAGE: APPS.MIGRATE_BATCH
12.1.1
-
APPS.MIGRATE_BATCH dependencies on GME_BATCH_HEADER
12.2.2
-
APPS.MIGRATE_BATCH dependencies on GME_BATCH_HEADER
12.1.1
-
PACKAGE BODY: APPS.MIGRATE_BATCH
12.2.2
-
PACKAGE BODY: APPS.MIGRATE_BATCH
12.1.1
-
APPS.MIGRATE_BATCH dependencies on FND_API
12.2.2
-
APPS.MIGRATE_BATCH dependencies on FND_API
12.1.1
-
APPS.MIGRATE_BATCH dependencies on PM_BTCH_HDR_BAK
12.1.1
-
APPS.MIGRATE_BATCH dependencies on PM_BTCH_HDR_BAK
12.2.2