Search Results get_unit_of_measure




Overview

GMD_SPREAD_CALCULATE_PKG is a Process Manufacturing (OPM) technical package in the Oracle E-Business Suite APPS schema that performs spread (formulation) calculations for products and their associated technical parameters. It is the calculation engine behind the OPM product spread/formula maintenance screens in Oracle Process Manufacturing. The package reads temporary working tables populated from the formula or material detail forms and executes rollup logic keyed on each technical parameter's data type, returning computed values for the entity being processed. Its header reflects a shipped Oracle file (GMDSPDCB.pls, version 120.9, 2011/11/30) consistent with the 12.1.1 and 12.2.2 code lines. The package is classified under ETRM as API classification OTHER, and it is referenced by no other packages, indicating it is invoked directly rather than as a shared utility library. A public procedure named calculate drives the bulk of the logic, iterating over product rows and dispatching to type-specific rollup routines. Error conditions encountered during evaluation are captured in the GMD_SPREAD_ERRORS_GTMP table.

Key Procedures and Functions

The documented procedures (10 total) perform the following work:

  • CALCULATE — The main entry point. Loops across product material detail rows joined to technical parameter rows, deletes prior entries from GMD_SPREAD_ERRORS_GTMP, and, based on data type and line type, calls the appropriate evaluation or rollup routine. Data type 4 or line type 1 with data type 11 triggers expression evaluation; data types 5 and 12 invoke weight-percent rollup; data types 6 and 7 invoke volume-percent rollup.
  • EVALUATE_EXPRESSION — Resolves a technical parameter's stored expression into a computed value for a given entity and line.
  • ROLLUP_WT_PCT — Rolls up weight percentage values through the product structure.
  • ROLLUP_VOL_PCT — Rolls up volume percentage values, using organization context for unit-of-measure-related conversions.
  • ROLLUP_COST_UPDATE — Updates rolled-up cost values.
  • ROLLUP_UPDATE — Persists rollup results back to the material detail tables.
  • ROLLUP_COST_UNITS — Computes cost per unit in the rollup.
  • ROLLUP_EQUIV_WT — Computes equivalent weight values used in formulation spread.
  • AUTO_CALC_PRODUCT — Automatically calculates product-level spread values.
  • TEMP_DUMP and TEMP_PARAM — Utility procedures that populate/refresh the temporary parameter and dump tables used by the calculation cycle.

Tables Accessed

All accesses occur through APPS synonyms. GMD_MATERIAL_HEADER_GTMP and GMD_MATERIAL_DETAILS_GTMP hold the transient header and detail rows for the entity being calculated; GMD_TECHNICAL_PARAMETER_GTMP supplies data type, unit code, sort sequence, and technical parameter identifiers that drive dispatch logic; GMD_TECHNICAL_DATA_GTMP stores the technical data values. GMD_SPREAD_ERRORS_GTMP collects errors generated during calculation and is cleared at the start of each CALCULATE run. FM_FORM_MST and FM_MATL_DTL are the base formula and material detail tables from which spread data is derived and to which results are ultimately written. MTL_UNITS_OF_MEASURE provides unit-of-measure validation and conversion attributes. The user's search for "get_unit_of_measure" relates to this package's use of the lm_unit_code column and MTL_UNITS_OF_MEASURE; note that the unit-of-measure lookup within GMD_SPREAD_CALCULATE_PKG is handled inline rather than through a dedicated documented procedure.

Usage Notes

GMD_SPREAD_CALCULATE_PKG is typically invoked from the Oracle Process Manufacturing product spread and formula maintenance forms, where it is called to compute and refresh technical parameter values whenever spread data is entered, changed, or re-rolled. It may also be executed from custom PL/SQL that requires the same rollup semantics. Because it operates against the temporary work tables (GMD_*_GTMP), callers must first populate header, detail, and technical parameter rows for the target entity before calling CALCULATE. It is not referenced by any other package, so it should be treated as a screen-session-oriented API rather than a batch or public integration interface. Validation errors should be read from GMD_SPREAD_ERRORS_GTMP after execution, and the X_return_status output should be checked to confirm success or failure.