Search Results effective_dates




Overview

GMD_VALIDITY_RULES_PVT is a private PL/SQL package in the Oracle E-Business Suite Process Manufacturing (OPM) module, owned by the APPS schema. It encapsulates the business logic that governs recipe validity rules, the records that control the effective dates, quantity tolerances, and routings associated with a production recipe. A validity rule determines the window during which a recipe version may be used, along with the minimum, maximum, and standard batch quantities permitted for that recipe.

The package is classified as a private API (PVT), meaning it is intended for internal consumption by other OPM packages and forms rather than for direct invocation by external or customer code. Its API version constant is set to 1. The package serves as the validation and maintenance backbone for the Recipe Validity Rules window within Oracle Process Manufacturing, ensuring that start dates, end dates, and quantity thresholds are consistent with the associated routing and item definitions before the rule is persisted.

Key Procedures and Functions

  • UPDATE_VALIDITY_RULES — The principal public procedure. It accepts a validity rule identifier and a PL/SQL associative-array of column/value pairs describing the columns to update, and returns a message count, message list, and return status. This generic update mechanism allows callers to modify selected columns of a validity rule without a fixed parameter list.
  • VALIDATE_START_DATE — Validates that a validity rule start date is consistent with the corresponding routing start date.
  • VALIDATE_END_DATE — Validates the validity rule end date against the routing end date.
  • EFFECTIVE_DATES — Confirms that the start date precedes the end date so the effective date range is logically valid.
  • STD_QTY — Checks that the standard batch quantity falls within the specified minimum and maximum quantity bounds.
  • MAX_QTY — Verifies that the minimum quantity does not exceed the maximum quantity.
  • CALC_INV_QTYS — Calls GMI stored procedures to convert minimum and maximum quantities between the item unit of measure and the inventory unit of measure, returning inventory-based quantities.
  • CALCULATE_PROCESS_LOSS — Derives the process loss associated with a validity rule assignment, supporting yield and loss reporting for the recipe.
  • CHECK_FOR_DUPLICATE — Detects duplicate validity rules to prevent conflicting or redundant rule definitions.

Several of these routines were originally declared in the package specification but have since been made private, and the header notes that some validation calls may be promoted to public scope in a future release.

Tables Accessed

The package reads and writes GMD_RECIPE_VALIDITY_RULES, the primary table holding validity rule definitions, and references GMD_PROCESS_LOSS for process loss data. Recipe and routing context is drawn from GMD_RECIPES, GMD_RECIPES_B, and GMD_ROUTINGS_B. Item and unit-of-measure validation relies on MTL_SYSTEM_ITEMS, MTL_UNITS_OF_MEASURE, and IC_ITEM_MST_B. Formulation detail is sourced from FM_FORM_MST and FM_MATL_DTL, while PLITBLM is used as a PL/SQL index-by table for bulk operations.

Usage Notes

GMD_VALIDITY_RULES_PVT is invoked primarily by the Recipe Validity Rules maintenance form and by two dependent OPM packages. The private classification means it should not be called directly from custom code; instead, the supported public APIs or the standard forms should be used. The calculate_process_loss routine is relevant where yield and loss figures must be derived from an assignment, typically during validity rule maintenance or downstream cost and yield reporting.