Search Results fetch_qa_plans
Overview
QA_PLANS_API is a public PL/SQL package body owned by APPS in Oracle E-Business Suite, classified as an API in the ETRM repository. It provides a programmatic interface to the QA_PLANS entity, which stores quality plan definitions used by Oracle Quality (QA) and related modules such as Oracle Manufacturing and Oracle Purchasing. The package serves two principal functions: it exposes lightweight accessor functions for individual attributes of a quality plan (organization, name, type, identifier), and it implements an internal cache through PL/SQL associative arrays that avoid repeated catalog lookups against the QA_PLANS base table. Because quality plans are referenced frequently during inspection, data collection, and specification evaluation, this caching pattern improves performance by retrieving a plan row only once per session and thereafter serving requests from memory. In EBS 12.1.1 and 12.2.2 the header revision reflects an older revenue-stream generation (qltplanb.plb 120.1), indicating the package has been stable since the 11i/12.0 code line and continues to be shipped unchanged in later releases.
Key Procedures and Functions
The package exposes eight documented program units. EXIS_QA_PLANS tests whether a given plan identifier is already present in the internal cache and returns a BOOLEAN. It is the predicate on which all other cached accessors depend and is the exact identifier referenced by the search term "exists_qa_plans."
- EXISTS_QA_PLANS — Returns TRUE if the specified plan id is present in the in-memory cache, FALSE otherwise.
- FETCH_QA_PLANS — Populates the cache for a plan id, opening the QA_PLANS cursor only when the id is not already cached.
- ORG_ID — Returns the organization identifier associated with a quality plan, or NULL when the plan is not found.
- PLAN_ID — Returns the plan identifier corresponding to a supplied plan name.
- VALID_PLAN_ID — Boolean validity check confirming that the supplied plan identifier resolves to an existing QA_PLANS row.
- PLAN_NAME — Returns the descriptive name attribute of a quality plan for a given id.
- GET_ORG_ID — Returns the organization identifier derived from a parameter value, with a documented SQL Repository fix (Bug 4958764) affecting the cursor against MTL_PARAMETERS.
- GET_PLAN_TYPE — Returns the quality plan type classification for the plan, typically resolved through lookup values.
Tables Accessed
The package reads the QA_PLANS synonym for the cached plan row and its NAME, ORGANIZATION_ID, and related columns. MTL_PARAMETERS is queried by GET_ORG_ID to resolve the current organization context. FND_LOOKUP_VALUES supplies lookup meanings for plan type resolution, and PLITBLM is referenced for EBS standard lookup translation consistent with the Bug 4958764 SQL Repository fix. All access is read-only through APPS synonyms; the package does not insert, update, or delete base table rows.
Usage Notes
QA_PLANS_API is invoked from Oracle Quality forms, specification validation logic, and custom extensions that require plan metadata without a direct query against QA_PLANS. Typical callers use VALID_PLAN_ID and EXIS_QA_PLANS as guard predicates before calling PLAN_NAME or ORG_ID, accepting that the caching behavior persists for the duration of the database session. Because the cache is session-scoped and never invalidated, callers should be cautious when plan attributes are modified within the same session, since stale values may be returned. The package is also referenced by five other packages in the APPS schema, indicating its role as a shared low-level utility within the Oracle Quality module.