Search Results get_max_test_method_duration
Overview
GMD_SAMPLES_GRP is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified as a GRP (group) layer object within the Oracle Quality and Process Manufacturing (OPM) product family. It serves as the core processing engine for sample management in process manufacturing environments, providing the business logic that supports the creation, validation, and lifecycle management of quality samples associated with lots, batches, specifications, and inventory transactions. The package encapsulates reusable routines that are consumed by higher-level group and public API layers, as evidenced by its dependency relationships: GMD_SAMPLES_GRP references the GMD_SAMPLES table directly and the STANDARD package in SYS, while it is referenced by GMD_DISP_GRP, GMD_DISP_PUB, GMD_RESULTS_GRP, GMD_RESULTS_PUB, GMD_SAMPLES_PUB, and GMD_SPEC_VRS_GRP. This position in the dependency hierarchy confirms its role as a shared internal service layer rather than a directly called public interface. In the context of EBS 12.1.1 and 12.2.2, the package supports the sampling workflow that underpins quality results, dispositioning, and specification version validation.
Key Procedures and Functions
The documented package exposes 23 procedures and functions. The validation group includes SAMPLING_EVENT_EXIST and SAMPLING_EVENT_EXIST_WO_SPEC, which determine whether a sampling event has already been recorded, the latter performing the check independently of specification linkage. SAMPLE_EXIST and VALIDATE_SAMPLE verify the existence and integrity of sample records. CHECK_FOR_NULL_AND_FKS_IN_SMPL performs null checking and foreign key validation against sample data before persistence.
Transaction processing routines include CREATE_INV_TXN, which builds the inventory transaction associated with a sample, and CREATE_WIP_TXN and POST_WIP_TXN, which construct and post work-in-process transactions where sampling interacts with production. UPDATE_REMAINING_QTY adjusts the residual quantity on a sample after consumption or testing. UPDATE_CHANGE_DISP_TABLE, UPDATE_SAMPLE_COMP_DISP, and UPDATE_LOT_GRADE_BATCH propagate sample outcomes into disposition, composite specification display, and lot grade or batch records.
Source resolution is handled by SAMPLE_SOURCE_DISPLAY and a family of source functions: INVENTORY_SOURCE, SUPPLIER_SOURCE, CUSTOMER_SOURCE, STABILITY_STUDY_SOURCE, PHYSICAL_LOCATION_SOURCE, and RESOURCE_SOURCE. GET_MAX_TEST_METHOD_DURATION returns the maximum duration associated with a test method, typically used for scheduling and lead-time calculation.
Tables Accessed
The package operates primarily on GMD_SAMPLES, the base sample table, and reads manufacturing structures including FM_FORM_MST, FM_MATL_DTL, FM_OPRN_MST, and FM_ROUT_HDR to resolve formula, material, operation, and routing context for sample generation. Lookup and user data are drawn from FND_LOOKUP_VALUES and FND_USER. Disposition and lot change logic touches GMD_CHANGE_DISPOSITION and GMD_CHANGE_LOTS, while specification context is provided by GMD_COMPOSITE_SPEC_DISP, GMD_CUSTOMER_SPEC_VRS, GMD_EVENT_SPEC_DISP, GMD_INVENTORY_SPEC_VRS, and GMD_MONITORING_SPEC_VRS. GMD_OPERATIONS supplies operation definitions relevant to sampling steps. All tables are referenced through APPS synonyms.
Usage Notes
GMD_SAMPLES_GRP is not intended for direct invocation by end users or custom code. It is called internally by the GRP and PUB packages listed as dependents, including GMD_SAMPLES_PUB, GMD_RESULTS_PUB, and GMD_DISP_PUB. In practice it is triggered through Oracle Quality and OPM forms and concurrent programs that create samples, record results, or execute dispositioning, with the source-resolution functions supplying the descriptive context displayed on those forms. Customizations should integrate at the PUB layer rather than calling GMD_SAMPLES_GRP directly, since its signatures and internal behavior are not part of the supported public API contract.