Search Results okc_allowed_tmpl_usages_s




Overview

The APPS.OKC_ALLOWED_TMPL_USAGES_PVT package body is a private (PVT) API belonging to the Oracle E-Business Suite Contracts (OKC) module. It provides the low-level data manipulation and validation logic that governs the association between contract terms templates and the business document types for which those templates are permitted. In Oracle Contracts, not every template may be used for every document type; the "allowed template usages" relationship enforces these permissible combinations so that users create contracts, quotes, or other contract documents only against templates that are valid for the selected business document type. This package encapsulates the insert, lock, update, delete, validation, and retrieval logic for rows in the allowed-usage intersection, exposing it in a controlled way to higher-level Contracts APIs and to the internal OKC_API layer. Because it is a PVT package, it is intended for internal consumption by other OKC packages rather than as a public integration entry point.

Key Procedures and Functions

  • INSERT_ROW — Creates a new allowed-usage record linking a terms template to a business document type, applying the package's standard attribute defaults and audit stamping.
  • LOCK_ROW — Obtains a row-level lock on an existing allowed-usage record, used to serialize concurrent modifications within a transaction.
  • UPDATE_ROW — Modifies the attributes of an existing allowed-usage record, retaining the standard who-column and concurrency handling.
  • DELETE_ROW — Removes an allowed-usage record so that the template is no longer offered for the associated document type.
  • VALIDATE_ROW — Applies the business rules that determine whether a proposed template/document-type association is legal before it is persisted.
  • GET_REC — Retrieves a single allowed-usage record and returns the resolved business document type and template details.

Tables Accessed

The package operates on OKC_ALLOWED_TMPL_USAGES, the base table holding the template-to-document-type associations, and reads OKC_ALLOWED_TMPL_USAGES_S, the corresponding sequence used to generate primary keys. It joins to OKC_BUS_DOC_TYPES_B, OKC_BUS_DOC_TYPES_TL, and OKC_BUS_DOC_TYPES_VL to resolve and validate the business document type, including its translatable name. OKC_TERMS_TEMPLATES_ALL provides the template definition and its language rows, ensuring the referenced template exists and is enabled. DUAL supports single-row lookups and sequence retrieval.

Usage Notes

Because OKC_ALLOWED_TMPL_USAGES_PVT is not referenced by any other database object and is documented as a private API, it is normally invoked indirectly. Callers reach it through OKC_API and through the Contracts setup forms that maintain template eligibility, particularly the administrative UI used to define which templates are available for each business document type. When a user saves an allowed-usage record, the form or API layer delegates to INSERT_ROW, UPDATE_ROW, or DELETE_ROW after invoking VALIDATE_ROW; LOCK_ROW guards concurrent edits and GET_REC supports read-back and query. Custom extensions should not call this PVT package directly but should instead use the supported public OKC APIs, preserving upgrade safety. Its heavy reliance on FND_API, FND_GLOBAL, and FND_PROFILE reflects standard EBS conventions for error handling, session context, and profile-based behavior.