Search Results insert_lab_formula




Overview

GMD_LAB_MIGRATION is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified in the ETRM repository under the API classification OTHER. Its name and header comment (GMDLMIGS.pls 115.3, dated 2003/07/17) identify it as a laboratory migration utility belonging to the Oracle Process Manufacturing (OPM) product family, specifically the GMD (Process Manufacturing) application module. The package exists to move or convert laboratory formula data from legacy or staging structures into the standard OPM formula tables, bridging the LM (laboratory management) and FM (formula management) data models.

Only a single procedure is exposed, and the package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user rather than the definer. This is consistent with a migration utility intended to be run by an administrator or upgrade process that already holds the necessary data privileges.

Key Procedures and Functions

The package contains one documented procedure:

  • INSERT_LAB_FORMULA — The sole entry point into the package. Based on its name and the surrounding metadata, it inserts laboratory formula records and their associated detail lines into the target OPM formula tables, drawing source data from the LM-form structures and writing into the FM-form structures. Because the ETRM record documents no parameter list, the procedure is understood to be a self-contained, no-argument driver: it operates on whatever source rows are present and orchestrated by the accompanying migration control tables. It should not be invoked speculatively, as it performs direct inserts against formula master and detail tables without a documented rollback interface.

Tables Accessed

The documented table list reflects a classic migration pattern — reading legacy/source tables, resolving language and sequence identifiers, and writing to destination tables.

  • FM_FORM_MST, FM_FORM_MST_B, FM_FORM_MST_TL — the OPM formula master tables (base, base-language, and translation). These are the primary write targets for the migrated formula headers.
  • FM_MATL_DTL — formula material detail; receives the migrated formula line components.
  • LM_FORM_MST, LM_FORM_DTL — the laboratory formula master and detail tables, read as the migration source.
  • GMD_LAB_FORMULA_ASSOC — the association table linking laboratory formulas to their migrated OPM formula counterparts; supports traceability and idempotency checks.
  • GMD_MIGRATION — the migration control/status table that tracks the execution of the migration run.
  • FND_LANGUAGES — used to determine valid language rows for the TL translation table.
  • GEM5_FORMULA_ID_S, GEM5_FORMULALINE_ID_S, GMD_REQUEST_ID_S — sequences supplying surrogate keys for formula headers, formula lines, and the migration request identifier respectively. The GEM5_ prefix indicates carriage from the earlier GEMMS/OPM lineage.
  • DUAL — utility selection, typically for sequence value retrieval or constant assignment.

Usage Notes

The ETRM metadata records that no other packages reference GMD_LAB_MIGRATION, indicating it is not part of the standard runtime call graph of OPM; it is an upgrade- or implementation-time utility rather than a transactional API. Typical invocation is through a DBA or upgrade script executed under the APPS schema during a data conversion or product migration project, or potentially from a concurrent program shell in custom migration harnesses.

Because the procedure performs direct inserts and depends on sequence objects and control tables such as GMD_MIGRATION, it is not designed for end-user or form invocation. Any use should be preceded by a backup of the FM_* and LM_* tables, and callers should confirm that the GMD_MIGRATION control row is initialized. The AUTHID CURRENT_USER declaration further implies that the invoking session must have explicit DML grants on the referenced tables and execute grants on the sequences.