Search Results get_gl_posted_ind




Overview

APPS.MIGRATE_BATCH is an Oracle Process Manufacturing (OPM) Process Execution utility package whose source file is GMEMIGBS.pls. It exists to migrate batch execution data from legacy or external staging structures into the native OPM Process Execution tables, primarily GME_BATCH_HEADER, GME_BATCH_STEPS, and GME_BATCH_STEP_ACTIVITIES. The package header dates to January 2001 and carries a revision history through 2005, indicating its role as a long-lived data conversion and validation asset rather than a transactional runtime API.

The package header comments describe it explicitly as the "Oracle Process Manufacturing Process Execution APIs" for migration, with code added over time to process one batch entity row at a time and to write error messages on the occurrence of an error. It also created a backup procedure for insert_message and a package constructor that initializes global variables (notably g_location, the path for the GME validation log file) and avoids repeated cursor calls. In EBS 12.1.1 and 12.2.2 the package remains classified as OTHER under the APPS schema and is referenced by no other packages, confirming it is an entry-point-only utility. The package variable p_default_loct defaults from the profile option IC$DEFAULT_LOCT, and a later fix removed hard-coded schema references.

Key Procedures and Functions

The 54 documented routines form three logical groups. The control and accessor functions include INITIALIZE_MIGRATION, GET_OPRN_ID, GET_PROCESS_QTY_UOM, GET_ACTUAL_COST_IND, GET_GL_POSTED_IND, GET_POC_DATA_IND, GET_REF_UOM, GET_BATCHSTEP_ID, GET_WIP_PLANNED_QTY, GET_PLANNED_QTY, GET_ACTUAL_QTY, GET_ACTUAL_ACTIVITY_FACTOR, GET_PLANNED_USAGE, GET_ACTUAL_USAGE, and CHECK_WIP_BATCHES. These retrieve routing operation identifiers, UOMs, cost and posting indicators, batch step identifiers, and planned or actual quantities and usages, and validate whether a batch is a WIP batch.

The migration drivers are RUN, INSERT_BATCH_HEADER, INSERT_MATERIAL_DETAILS, INSERT_BATCH_STEPS, and INSERT_BATCH_STEP_DTLS. RUN orchestrates the migration; the INSERT_* procedures write validated data into the batch header, material detail, and batch step structures. INSERT_BATCH_STEPS and INSERT_BATCH_STEP_DTLS are the routines bearing on the "insert_batch_steps" search: they create batch step and step activity records for the batch being migrated. Additional procedural routines include INSERT_MESSAGE_INTO_TABLE, now a private procedure removed from the package specification, and SPLIT_TRANS_LINE and IS_REVERSAL, added to split the completed default lot line and to detect reversal transactions. The package maintains p_default_loct to hold the transaction IDs of reversal transactions.

Tables Accessed

The package reads and writes GME_BATCH_HEADER, GME_BATCH_STEPS, and GME_BATCH_STEP_ACTIVITIES, the core Process Execution tables receiving migrated data. It reads PM_OPRN_DTL, PM_ROUT_DTL, and FM_OPRN_MST for routing and operation definition data. Item and warehouse validation use IC_ITEM_MST and PS_WHSE_EFF. Transaction and pending transaction handling uses IC_TRAN_PND and the sequence GEM5_TRANS_ID_S. Costing reads CM_ACST_LED and CM_COMPT_DTL, while resource costing uses CR_RSRC_DTL. Backup tables PM_BTCH_HDR_BAK and PM_MATL_DTL_BAK preserve prior versions of header and material detail rows.

Usage Notes

MIGRATE_BATCH is invoked from migration or conversion tooling rather than from standard OPM forms; no packages reference it, so calls originate in custom conversion scripts, external staging loaders, or OPM migration utilities that wrap RUN. The typical sequence is INITIALIZE_MIGRATION to establish logging and globals, CHECK_WIP_BATCHES for validation, then the INSERT_* procedures per batch entity, with errors captured through the internal message mechanism. Because the package records errors as it processes a single batch row at a time, callers should inspect the GME validation log and message table between iterations.

Implementers should treat the API as a supported conversion aid, not a supported public API. It is schema-qualified to APPS, depends on profile option IC$DEFAULT_LOCT, and writes directly to production batch tables via their APPS synonyms. Test migrations should be run in a cloned instance, backups confirmed in PM_BTCH_HDR_BAK and PM_MATL_DTL_BAK, and the sequence GEM5_TRANS_ID_S checked before execution. Behavior is consistent across 12.1.1 and 12.2.2, since the documented metadata reflects the same routines in both releases.