Search Results get_step_material_lines




Overview

GMD_AUTO_STEP_CALC is an Oracle EBS Process Manufacturing (OPM) package owned by APPS and deployed with AUTHID CURRENT_USER. It encapsulates the business logic used to automatically calculate recipe and batch step quantities during process manufacturing. The package resolves scaling across routing steps, formula lines, and material lines so that planned and actual quantities of mass, volume, and "other" units of measure remain consistent when a recipe is interpreted for a batch or when step quantities change.

The source declares several PL/SQL record and table types that reveal its scope: step_rec_type (STEP_ID, STEP_NO, STEP_QTY, and associated UOMs), work_step_rec_type (line-level mass, volume, and other quantities), calculatable_rec_type, check_step_mat_type (counts of ASQC and step-associated recipes), work_step_qty_rec_type (plan/actual quantities keyed by STEP_NO), and formulaline_scale_rec / formulaline_scale_tab (formula line scaling attributes such as scale_type, contribute_yield_ind, scale_multiple, and rounding direction). These types support step quantity propagation and rounding behavior that is characteristic of OPM recipe scaling.

Key Procedures and Functions

  • LOAD_STEPS — Loads routing step records for a recipe or batch context, providing the working set on which subsequent calculations operate.
  • GET_STEP_REC — Retrieves a single step record, returning the step definition used by the calculation routines.
  • STEP_UOM_MASS_VOLUME — Converts or derives step quantities across mass, volume, and other UOMs based on the step's defined units.
  • GET_STEP_MATERIAL_LINES — Returns the material lines associated with a step, providing quantities consumed or produced at that step.
  • SORT_STEP_LINES — Orders step lines (by line number and type) so cascading calculations process in the correct sequence.
  • CALC_STEP_QTY — The core calculation routine; computes step quantities, propagating quantities through the step and formula lines and applying scaling and rounding.
  • CHECK_STEP_QTY_CALCULATABLE — Determines whether a given step's quantities can be calculated, guarding against invalid or incomplete recipe definitions.
  • CHECK_DEL_FROM_STEP_MAT — Validates whether a material can be removed from a step, checking dependencies before deletion.
  • CASCADE_DEL_TO_STEP_MAT — Cascades deletion of step material records when a parent step or line is removed.

Tables Accessed

The package reads and writes through APPS synonyms. Recipe definition data comes from GMD_RECIPES, GMD_RECIPES_B, GMD_OPERATIONS_B, GMD_RECIPE_ROUTING_STEPS, and GMD_RECIPE_STEP_MATERIALS. Formula structure is held in FM_FORM_MST, FM_MATL_DTL, FM_ROUT_DEP, and FM_ROUT_DTL. Unit-of-measure conversion uses MTL_UNITS_OF_MEASURE. Status validation uses GMD_STATUS_B. Batch execution data is handled in GME_BATCH_HEADER, GME_BATCH_STEPS, GME_BATCH_STEP_DEPENDENCIES, and GME_BATCH_STEP_ITEMS, allowing the same calculation logic to apply to both recipes and released batches.

Usage Notes

GMD_AUTO_STEP_CALC is an internal OPM engine called by nine other packages, and is typically invoked indirectly through recipe maintenance forms, batch creation, and step quantity recalculation logic rather than directly by end users. It is not a public API; customizations should call the higher-level APIs that wrap it, since the procedure signatures and record types are subject to change across 12.1.1 and 12.2.2. The presence of AUTHID CURRENT_USER means the package executes with the privileges of the calling schema, so grants on underlying GMD, FM, and GME tables must be in place for any custom caller. No form-level "auto click" behavior is documented for this package; the term in the user query likely refers to a UI interaction unrelated to this PL/SQL object.