Search Results gmd_tech_exp_seq_id_s




Overview

GMD_EXPRESSION_MIG_UTIL is a utility package in the Oracle EBS Process Manufacturing (OPM) schema, classified as a UTIL object and owned by APPS. Its primary business function is to parse, migrate, and evaluate the mathematical expressions that drive technical parameter calculations and product formulation logic within Oracle Process Manufacturing. These expressions define how ingredient quantities, technical data, and parameter values are computed from other parameters, constants, and operators.

The package is responsible for tokenizing free-form expression strings into structured rows stored in the parsed-expression table, and for subsequently interpreting those tokens to return computed values. It supports a fixed vocabulary of arithmetic and aggregate operators, including +, -, /, *, parentheses, comma separators, and functions such as SUM, ISUM, BSUM, POWER, ABS, SQRT, EXP, LOG, LN, MOD, ROUND, and CEIL. The G_PKG_NAME constant identifies the runtime package as 'GMD_EXPRESSION_UTIL'.

Key Procedures and Functions

The package exposes nine documented procedures and functions:

  • PARSE_EXPRESSION — The anchor routine. It converts a supplied expression string into discrete tokens recorded in GMD_PARSED_EXPRESSION. It detects circular references (raising a pre-declared CIRCULAR_REFERENCE exception tied to ORA-01436) and expression-key errors, and returns a status indicator to the caller.
  • INSERT_EXPRESSION_KEY — Inserts a new expression key record, establishing the identity under which a parsed expression is stored and later resolved.
  • IS_OPERATOR — Tests whether a given token corresponds to one of the recognized operators or function names held in the internal Operator_Table.
  • IS_PARAMETER — Determines whether a token references a technical parameter rather than a literal or operator.
  • IS_NUMBER — Validates whether a token represents a numeric literal.
  • ADD_EXPRESSION_ROW — Adds an individual parsed row (token) to the parsed-expression structure, building the token stream one element at a time.
  • EVALUATE_EXPRESSION_VALUE — Computes the numeric result of a parsed expression using the resolved parameter values.
  • GET_VALUE — Retrieves the value associated with a given parameter or token during evaluation.
  • EVALUATE_EXPRESSION — The orchestration routine that drives full evaluation of an expression from parse structure to final result.

Tables Accessed

  • GMD_PARSED_EXPRESSION — Stores the tokenized output of expressions; read and written during parsing and used by the looping cursor that guards against recursive expressions.
  • GMD_TECH_PARAMETERS_B — The technical parameters base table supplying parameter definitions and data types referenced during parsing and validation.
  • GMD_MATERIAL_DETAILS_GTMP — A global temporary table holding material detail data used as evaluation input.
  • GMD_TECHNICAL_DATA_GTMP — A global temporary table holding technical data values passed into evaluation.
  • GMD_TECH_EXP_SEQ_ID_S — Sequence supplying unique identifiers for expression records.
  • PLITBLM — The standard PL/SQL table-of-varchar2 type used for in-memory collections.

Usage Notes

The package is typically invoked indirectly through OPM technical-parameter maintenance forms and formulation processing, where expression strings are authored and later evaluated. It may also be called by concurrent programs that migrate or validate expressions, and by custom code that must resolve parameter expressions programmatically. One other package references it, indicating it sits within a small dependency chain rather than being a top-level entry point. Callers should be aware that PARSE_EXPRESSION establishes a savepoint and can raise exceptions for circular references; the originating source header dates to 2005, with cursor logic revised to avoid CONNECT BY errors in 8i, so the implementation should be treated as legacy but stable across 12.1.1 and 12.2.2.