Search Results log_qa_messages




Overview

OKC_TERMS_QA_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module, owned by the APPS schema. It forms the core quality-assurance validation engine for the Oracle Contracts terms and conditions authoring framework, which is part of Oracle Enterprise Trading and Relationship Management (ETRM). The package executes the business rules that determine whether a contract document, template, or article is valid, complete, and internally consistent before it can be finalized, approved, or amended.

The package is declared with AUTHID CURRENT_USER, meaning all database object references resolve through the invoking user's schema and privileges rather than the package owner's. Its header, last updated under version 120.3.12000000.1 in January 2007, carries forward into both EBS 12.1.1 and 12.2.2. It exposes five documented procedures used by the Contracts runtime and supports both normal authoring QA (G_NORMAL_QA) and amendment QA (G_AMEND_QA) modes, a distinction introduced in the 11.5.10 release.

Key Procedures and Functions

  • QA_DOC — The master entry point for document-level quality assurance. It accepts a QA mode, document type, and document identifier, then returns a return status, message count and data, a sequence identifier, and a collection of QA results (qa_result_tbl_type) plus an overall QA return status. Additional input parameters support validation level and an expert-rule execution flag (added via Bug 5186245).
  • LOG_QA_MESSAGES — Persists the QA result collection produced by QA_DOC into the QA error tables so messages are recorded and later surfaced to the user.
  • GET_QA_CODE_DETAIL — Resolves a QA code to its descriptive metadata: whether QA should be performed, the QA name, and the associated severity flag.
  • CHECK_LOCK_CONTRACT — Verifies whether a contract is locked, preventing conflicting edits during QA processing.
  • CHECK_CONTRACT_ADMIN — Validates contract administrative rules against the document being processed, contributing results to the QA result collection passed in and out of the routine. This procedure is the object most directly associated with searches for "check_contract_admin."

Tables Accessed

The package operates across the core Contracts data model via APPS synonyms. Document and template structures are read from OKC_BUS_DOC_TYPES_B/TL, OKC_BUS_VARIABLES_B/TL, OKC_K_ARTICLES_B, OKC_ARTICLES_ALL, OKC_ARTICLE_VERSIONS, OKC_ARTICLE_ADOPTIONS, and OKC_ARTICLE_RELATNS_ALL. Article variable values are resolved through OKC_ARTICLE_VARIABLES and OKC_K_ART_VARIABLES. QA configuration and results are managed through OKC_DOC_QA_LISTS and OKC_QA_ERRORS_T, while template usage rules come from OKC_ALLOWED_TMPL_USAGES. FND_USER supplies the current user context.

Usage Notes

Because OKC_TERMS_QA_PVT is a private package, it is not called directly by customers; instead it is invoked by the seven dependent packages and by the Contracts authoring forms and concurrent programs that drive document and template validation. The QA_DOC routine is typically triggered when a user attempts to submit, approve, or amend a contract document, and its results are persisted by LOG_QA_MESSAGES into OKC_QA_ERRORS_T for display in the user interface. Custom development should call the public Contracts APIs rather than this PVT layer, since its signature is subject to change between patch levels.