Search Results is_lot_selected




Overview

GMD_OPTIMIZE_FETCH_PKG is an Oracle EBS Process Manufacturing (OPM/GMD) PL/SQL package owned by the APPS schema. It supports the material optimization and rollup engine within Oracle Process Manufacturing, providing the fetch and recalculation logic used when the application builds optimization results from material detail, technical data, and parameter input. In OPM, "optimization" refers to the consolidation and rollup of material quantities, weights, volumes, equivalent weights, and costs across a selected entity (such as a batch, formula, or production entity) and organization. This package retrieves the relevant optimizer header, line, parameter, and value records, calculates the resulting totals, and writes the updated mass, volume, and cost figures back to the appropriate tables.

Key Procedures and Functions

The package exposes twelve documented program units, primarily procedures with OUT NOCOPY status parameters for error handling, plus several functions that return scalar values.

  • LOAD_OPTIMIZER_DETAILS — Loads optimizer detail records for a given entity and maintenance type into the working tables.
  • CALCULATE — Performs the core optimization calculation for an entity within a specified organization.
  • ROLLUP_WT_PCT — Rolls up weight percentages for the entity and a named parameter/parameter ID.
  • ROLLUP_VOL_PCT — Rolls up volume percentages for the entity and parameter.
  • ROLLUP_UPDATE — Applies the rolled-up results back to the optimizer records.
  • ROLLUP_COST_UNITS — A function returning the rolled-up cost units for the entity and parameter.
  • ROLLUP_EQUIV_WT — Rolls up equivalent weights, using the unit code and organization context.
  • IS_LOT_SELECTED — A function indicating whether a parent line has a selected lot.
  • CONSIDER_LINE — A function determining whether a given line should be included in processing.
  • GET_DENSITY_VALUE — A function returning the density value for a line and density parameter.
  • UPDATE_LINE_MASS_VOL_QTY — Updates mass, volume, and quantity for an individual line using the density parameter and mass/volume UOMs.
  • UPDATE_MASS_VOL_QTY — Updates mass, volume, and quantity across the entity in a given organization.

Tables Accessed

The package works against a set of OPM global temporary tables and reference views via APPS synonyms. The GMD_OPTIMIZER_HDR_GTMP, GMD_OPTIMIZER_LINE_GTMP, GMD_OPTIMIZER_PRM_GTMP, and GMD_OPTIMIZER_VALUE_GTMP tables hold the optimizer header, line, parameter, and value working data. GMD_MATERIAL_DETAILS_GTMP supplies material detail lines, while GMD_TECHNICAL_DATA_GTMP and GMD_TECHNICAL_PARAMETER_GTMP provide the technical (such as density) attributes used in calculations. MTL_SYSTEM_ITEMS_KFV resolves item information, and DUAL is used for scalar evaluations.

Usage Notes

This package is typically invoked from the OPM material optimization and rollup forms and related concurrent programs during batch or formula processing. The metadata indicates it is classified as OTHER and is referenced by zero other packages, meaning it functions as a top-level worker rather than a shared utility. The header revision (GMDOPTMS.pls 120.1, dated 2005) reflects long-standing Process Manufacturing optimization logic carried forward into EBS 12.1.1 and 12.2.2. Because it manipulates global temporary tables, callers must ensure the appropriate session context and organization/entity identifiers are established before invoking the calculation and rollup routines. The OUT NOCOPY return status parameters indicate that callers should check status after each call rather than relying on exceptions.