Search Results get_multival_udv_for_xprt




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKC_CODE_HOOK is a server-side PL/SQL package body owned by APPS that functions as the programmable extension layer for Oracle Contract Terms and Conditions (OKC) in Oracle E-Business Suite 12.1.1 and 12.2.2. Its central purpose is to let implementations override, augment, or intercept default behavior in Oracle Contracts and Oracle Expert without modifying Oracle-owned code. The package exposes hook points that the contracting runtime invokes at defined moments — for example when resolving multi-valued user-defined variables, ordering Expert clauses, validating quality-assurance rules, and synchronizing contracting documents with related sub-entities. The header line references the 120.13.12020000.2 version shipped in 2012, confirming its long-standing role in the R12 code line. Because Oracle Contracts is highly configurable, the hooks provide a sanctioned customization surface: customers write site-specific logic inside stub procedures that the base product calls. The API classification is OTHER, meaning it is not a public transactional API but an internal extension point. Nevertheless, it is widely referenced, since three other packages depend on it, and it is the documented location for the sort_clauses hook that governs clause sequencing.

Key Procedures and Functions

The package documents seven callable units.

  • GET_MULTIVAL_UDV_FOR_XPRT — Returns the multiple values associated with a user-defined variable in Expert. It is called once per user-defined variable that participates in the hook, and reports through its output parameters whether the hook was used (0 not used, -1 error, any other value indicating use) as well as the ordered variable-code/value rows.
  • GET_XPRT_CLAUSE_ORDER — Supplies the clause ordering that Expert applies when assembling contract text. This is closely tied to SORT_CLAUSES.
  • IS_NOT_PROVISIONAL_SECTION — Determines whether a given section is not provisional, supporting validation of the contract’s structural state before downstream processing.
  • IS_NEW_KFF_ITEM_SEG_ENABLED — Tests whether a new Key Flexfield item segment is enabled, allowing contracting logic to branch on descriptor configuration.
  • SYNC_RWA_WITH_DOCUMENT — Synchronizes the related RWA (contract) record with the document, ensuring the two remain consistent.
  • RULES_QA_CHECK — Performs quality-assurance rule checking, writing or reading QA outcomes so that rule violations are surfaced to the user.
  • SORT_CLAUSES — Applies the clause sort order used when presenting or printing contract articles. This is the hook most commonly associated with search term “sort_clauses”; users searching that phrase are typically looking for where to customize article ordering. Implementations override SORT_CLAUSES to apply business-specific sequencing.

Tables Accessed

The package works against four documented tables via APPS synonyms.

  • OKC_K_ARTICLES_B — The base table for contract articles and clauses; read to determine clause definitions and sequencing inputs.
  • OKC_ARTICLES_ALL — The article and section data for a specific contract; used when resolving section state and clause order in context of an actual document.
  • OKC_QA_ERRORS_T — Stores quality-assurance errors raised during rule checking, populated by RULES_QA_CHECK.
  • OKC_XPRT_RULE_OUTCOMES — Captures Expert rule outcomes used by the hooks to decide clause order and variable values.

Usage Notes

OKC_CODE_HOOK is not invoked directly from a form or concurrent program by end users. Rather, Oracle Contracts and Expert call it internally at the documented hook points, and customers place site-specific logic inside the stubs. The procedures are therefore typically touched through the Contracts authoring UI when articles are generated, clauses are sorted, or Expert rules are evaluated, and indirectly during concurrent processes that render or validate contract documents. Because only three packages reference it, its dependency footprint is narrow, reinforcing its design as a pluggable extension rather than a shared utility. Implementations should follow the documented NOCOPY convention on OUT and IN OUT parameters and preserve the standard return status and message-count contract. Customizations should be placed in a separate custom package where possible, with OKC_CODE_HOOK re-pointed or wrapped, to ease upgrades across 12.1.1 and 12.2.2.