Search Results find_matching_spec
Overview
GMD_SAMPLES_PUB is a public PL/SQL API package owned by the APPS schema in Oracle E-Business Suite, classified under ETRM as an API of type PUB. It belongs to the Oracle Process Manufacturing (OPM) Quality Management module and provides the programmatic interface for creating, validating, and deleting quality samples. In OPM Quality, a "sample" represents a physical specimen drawn from a lot, batch, inventory item, customer shipment, supplier receipt, WIP job, or resource, which is then tested against a specification to determine conformance. GMD_SAMPLES_PUB encapsulates the business rules governing that lifecycle so that forms, concurrent programs, and custom code can manipulate samples without directly touching the underlying tables.
The package carries a VALID status in the 12.1.1 and 12.2.2 releases and exposes twelve documented procedures and functions. It follows the standard EBS API conventions by leveraging FND_API, GMD_API_PUB, and the OPM specification display views for error handling and specification resolution. Because it is a public API, it is the supported entry point for sample-related integration and extension, insulating callers from the internal structure of the GMD tables.
Key Procedures and Functions
The documented entry points group into three functional areas: creation, deletion, and validation.
- CREATE_SAMPLES — the primary API for instantiating one or more sample records, resolving the applicable specification and writing the resulting rows into the sample tables.
- DELETE_SAMPLES — removes sample records, applying the API's referential and status checks before deletion.
- FIND_MATCHING_SPEC — identifies the specification that applies to a given item, customer, supplier, or transaction context by evaluating the OPM specification versions and validity rules.
- VALIDATE_SAMPLE — the general validation routine that verifies a sample record against core quality, item, and specification controls.
- VALIDATE_ITEM_CONTROLS — checks item-level quality control settings to determine whether sampling is permitted and consistent for the item.
- VALIDATE_INV_SAMPLE, VALIDATE_CUST_SAMPLE, VALIDATE_SUPP_SAMPLE, VALIDATE_WIP_SAMPLE, VALIDATE_LOCATION_SAMPLE, VALIDATE_RESOURCE_SAMPLE, and VALIDATE_STABILITY_SAMPLE — context-specific validators that apply the rules appropriate to each sample source: inventory, customer, supplier, WIP, location, resource, and stability studies respectively.
Only the procedure and function names are documented in the ETRM metadata; parameter signatures should be confirmed against the package specification in the target instance.
Tables Accessed
Access is performed through APPS synonyms. The core sample and event tables are GMD_SAMPLES (the master sample record), GMD_SAMPLING_EVENTS (event definitions that trigger sampling), and the display views GMD_SAMPLE_SPEC_DISP and GMD_EVENT_SPEC_DISP, which resolve specification details for sample and event contexts. Specification matching also draws on GMD_CUSTOMER_SPEC_VRS, GMD_INVENTORY_SPEC_VRS, and GMD_MONITORING_SPEC_VRS.
Routing and manufacturing context is supplied by GMD_RECIPES_B, GMD_RECIPE_VALIDITY_RULES, GMD_OPERATIONS, FM_FORM_MST_B, and FM_MATL_DTL, while CR_RSRC_MST provides resource master data. FND_USER supplies user identity for audit purposes, and GMD_QUALITY_CONFIG holds quality configuration settings consulted during validation. These tables collectively allow the API to confirm that a sample is valid in its manufacturing, inventory, and quality context before committing data.
Usage Notes
GMD_SAMPLES_PUB is typically invoked from OPM Quality forms when users enter or validate samples, from concurrent programs that generate samples for incoming inventory, batches, or stability studies, and from custom PL/SQL that requires supported sample creation. The referenced-by metadata lists the package itself, meaning its own internal routines are the primary consumers; no other packaged API is documented as depending on it.
Because it is a PUB API, custom code should call GMD_SAMPLES_PUB rather than inserting directly into GMD_SAMPLES, ensuring that specification matching, item controls, and context validation are consistently enforced. Callers should anticipate FND_API-style error and message conventions and invoke the appropriate context-specific validator before CREATE_SAMPLES. In 12.1.1 and 12.2.2 the interface is stable, though OPM Quality table structures should be verified for edition-specific changes.
-
PACKAGE: APPS.GMD_SAMPLES_PUB
12.1.1
-
PACKAGE: APPS.GMD_SAMPLES_PUB
12.2.2
-
PACKAGE BODY: APPS.GMD_SAMPLES_PUB
12.1.1
-
PACKAGE BODY: APPS.GMD_SAMPLES_PUB
12.2.2
-
APPS.GMD_SAMPLES_PUB dependencies on GMD_SAMPLES
12.2.2
-
APPS.GMD_SAMPLES_PUB dependencies on GMD_SAMPLES
12.1.1
-
APPS.GMD_SAMPLES_PUB dependencies on GMD_SAMPLES
12.2.2
-
APPS.GMD_SAMPLES_PUB dependencies on GMD_SAMPLES
12.1.1