Search Results validate_spec_header




Overview

GMD_SPEC_GRP is a Group layer PL/SQL package in the Oracle EBS Process Manufacturing (OPM) Quality module, owned by APPS and classified as GRP in the ETRM repository for release 12.2.2. It exposes the group-level API surface for the Specification Entity, the master data object that defines quality specifications (headers, tests, targets, and version-controlled states) used across OPM Quality, Inventory, Customer, and Monitoring specification types. The package header carries the source file name GMDGSPCS.pls and a history noting creation on 26-Jul-2002 and modification on 07-Feb-2005 as part of the Convergence effort that aligned OPM quality objects with the E-Business Suite technical stack.

Its role is to centralize validation logic and lifecycle operations for specifications so that all calling APIs, forms, and batch processes enforce a consistent set of business rules around test sequencing, precision, UOM classes, owner organization security, and version control state transitions.

Key Procedures and Functions

The package documents 22 procedures and functions. Core validation entry points include VALIDATE_SPEC_HEADER, which validates a specification header row passed in as a GMD_SPECIFICATIONS%ROWTYPE before insert or update, and VALIDATE_SPEC_TEST, which validates a specification test row and returns the corrected row plus a return status. VALIDATE_AFTER_INSERT_ALL, VALIDATE_AFTER_DELETE_TEST, and VALIDATE_BEFORE_DELETE enforce post- and pre-DML consistency rules.

Existence and look-up functions include SPEC_VERS_EXIST, SPEC_TEST_EXIST, SPEC_TEST_SEQ_EXIST, SPEC_REFERENCE_TESTS_EXIST, SPEC_OWNER_ORGN_VALID, and UOM_CLASS_COMBO_EXIST. Further validators cover numeric range and display checks (SPEC_TEST_MIN_TARGET_MAX_VALID, VALUE_IN_NUM_RANGE_DISPLAY), precision (SPEC_TEST_PRECISIONS_VALID), expected test error regions (SPEC_TEST_EXP_ERROR_REGION_VAL), and editability (RECORD_UPDATEABLE_WITH_STATUS). Lifecycle and state operations are handled by VERSION_CONTROL_STATE, CREATE_SPECIFICATION, and CHANGE_STATUS. SPEC_USED_IN_SAMPLE determines whether a specification is referenced by sampling activity. Note that VERSION_CONTROL_STATE is the function surfaced by the user's search for "version_control_state" and governs specification version status logic.

Tables Accessed

The package reads and writes the following tables through APPS synonyms: GMD_SPECIFICATIONS and GMD_SPECIFICATIONS_B (specification headers and their base table), GMD_SPEC_TESTS (specification test lines), and the specification version tables GMD_CUSTOMER_SPEC_VRS, GMD_INVENTORY_SPEC_VRS, and GMD_MONITORING_SPEC_VRS. Sequence GMD_QC_SPEC_ID_S supplies specification identifiers.

Quality configuration and test data are accessed through GMD_QC_STATUS, GMD_QC_STATUS_NEXT, GMD_QC_STATUS_TL, GMD_QC_TESTS, GMD_QC_TESTS_B, and GMD_QC_TEST_VALUES_B. Sampling integration uses GMD_SAMPLING_EVENTS, and user security context is resolved through FND_USER. These tables support validation of owner organization, status transitions, test precision, UOM classes, and version control state.

Usage Notes

GMD_SPEC_GRP is referenced by eight other packages, indicating it is a shared group-layer utility invoked by specification APIs, status-change routines, and sampling-related logic rather than being called directly from the user interface. Typical invocation occurs from specification maintenance forms, specification creation and update APIs, and concurrent programs that load or migrate specification data. Custom code extending OPM Quality should call these group procedures after populating header and test records, relying on the returned return_status values to detect validation failures before commit. The VERSION_CONTROL_STATE function in particular should be consulted when custom logic needs to determine the current version state of a specification before allowing edits or status changes.