Search Results set_sample_size




Overview

QA_SAMPLING_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that encapsulates the sampling-plan logic used by Oracle Quality and Oracle Receiving. Its primary business function is to evaluate sampling rules, compute sample sizes, and determine inspection results for lots received or produced. The package bridges the Quality module's sampling plans with the receiving transaction flow by exposing APIs that determine whether a given transaction should be sampled, calculate the appropriate sample size, and interpret inspection outcomes against acceptance criteria.

The package is classified as "OTHER" API status in the documented ETRM metadata (12.2.2), meaning it is not part of the officially published public API set and is generally intended for internal module consumption. Its status is VALID, confirming the package compiles successfully against the APPS schema and is present on both 12.1.1 and 12.2.2 environments.

Key Procedures and Functions

The package exposes ten documented procedures and functions:

  • EVAL_RCV_SAMPLING_PLAN — Evaluates the sampling plan applicable to an inbound receiving transaction, resolving which sampling standard or custom rule governs the receipt.
  • SET_SAMPLE_SIZE — Determines and assigns the sample size for a given lot based on the resolved sampling plan's inspection level and lot size.
  • GET_PLAN_RESULT — Returns the sampling plan's outcome, typically the accept/reject determination at the plan level.
  • GET_LOT_RESULT — Retrieves or derives the result for a specific lot after inspection results are recorded.
  • LAUNCH_SHIPMENT_ACTION — Initiates a shipment-related action when sampling outcomes require a supplier or shipment response.
  • IS_SAMPLING — Boolean-style predicate that returns whether sampling is required for the transaction being processed.
  • LAUNCH_WORKFLOW — Triggers the workflow associated with the sampling/inspection outcome, driving notifications or approvals.
  • CALCULATE_LOT_RESULT — Computes the final lot disposition by aggregating collection results against acceptance criteria.
  • POST_INSP_COLL_DETAILS — Posts detailed inspection collection data back to the Quality tables.

Tables Accessed

Sampling rule and plan definitions are read from QA_SAMPLING_PLANS, QA_SAMPLING_STD_RULES, QA_SAMPLING_CUSTOM_RULES, and QA_SAMPLING_INSP_LEVEL. Plan and characteristic definitions come from QA_PLANS, QA_PLAN_CHARS, and QA_CHARS. Inspection specification data is stored in QA_INSP_PLANS_TEMP, QA_INSP_COLLECTIONS_TEMP, QA_INSP_COLLECTIONS_DTL_TEMP, and QA_RESULTS. Receiving context is obtained from RCV_LOTS_SUPPLY and QA_RCV_LOT_SER_TEMP. Item and inventory context are read from MTL_SYSTEM_ITEMS_B and MTL_SECONDARY_INVENTORIES. All access is via APPS synonyms.

Usage Notes

QA_SAMPLING_PKG is referenced by QA_INSPECTION_PKG and QA_SKIPLOT_RES_ENGINE, indicating that it sits beneath the inspection and skip-lot engines and is called as part of quality inspection processing rather than directly by end users. It is typically invoked from Oracle Quality forms, Receiving transaction processing, and skip-lot resolution flows. Customizations should call the documented procedures rather than duplicating sampling logic, since sampling evaluation depends on rule configuration and inspection levels maintained in the QA_SAMPLING_* tables.