Search Results okc_terms_templates_pvt




Overview

The APPS.OKC_TERMS_TEMPLATES_PVT package body is a private (PVT) PL/SQL API within the Oracle Contracts (OKC) module of Oracle E-Business Suite, delivered in releases 12.1.1 and 12.2.2. It provides the internal processing logic that supports the Terms Templates framework, which allows organizations to define reusable clause and template structures applied to contracts, sales agreements, and related sourcing documents. As a private package, it is not intended for direct invocation by external integrations; instead, it is consumed by public OKC APIs, forms-based transactions, and concurrent processes that manage template lifecycle operations. The package is recorded as VALID in the APPS schema and is classified as a private API layer, indicating that it encapsulates low-level row manipulation, validation, and locking logic separated from its public-facing counterpart.

Key Procedures and Functions

The documented ETRM metadata lists seven procedures and functions exposed by this package body:

  • INSERT_ROW — Creates a new terms template record in the underlying table, initializing mandatory columns and default attributes required for downstream template processing.
  • LOCK_ROW — Acquires a row-level lock on an existing terms template, typically invoked at the start of an update transaction to prevent concurrent modification.
  • UPDATE_ROW — Applies changes to an existing terms template record, persisting modified attribute values through the base table.
  • DELETE_ROW — Removes a terms template record from the database, subject to any referential or validation constraints enforced by the API.
  • VALIDATE_ROW — Performs business-rule and data-integrity checks on template data before insert or update operations are committed.
  • GET_REC — Retrieves a single terms template record, returning its attributes for display or further programmatic handling.
  • UPDATE_TEMPLATE_ID — Updates the template identifier association on a record, supporting internal maintenance of template identity relationships.

These procedures collectively implement standard CRUD-plus-validation semantics consistent with the FND_API error-handling conventions referenced in the package's dependency list.

Tables Accessed

The package operates primarily against OKC_TERMS_TEMPLATES_ALL and its sequence/synonym companion OKC_TERMS_TEMPLATES_ALL_S, which store the master template definitions and supply primary key values. It also references OKC_EXPRT_IMPORT_REFS to support template export and import reference tracking. Supporting lookups include FND_ORACLE_USERID for identifying the application user, ALL_VIEWS and DUAL for metadata and utility queries, and the CZ_SRC_DEVL_PROJECTS_V view. Additional dependencies such as OKC_API, OKC_UTIL, OKC_XPRT_TMPL_RULE_ASSNS_PVT, FND_API, FND_GLOBAL, FND_MSG_PUB, and FND_LOG provide error messaging, logging, and rule-association services.

Usage Notes

In typical EBS deployments, OKC_TERMS_TEMPLATES_PVT is invoked indirectly through the Oracle Contracts forms and through the public wrappers that manage terms template administration. It is also called during concurrent processing of template export/import operations, where the export-import reference records are maintained. Because it is a private API marked as not referenced by any database object and relied upon by eight other packages, customizations should avoid direct calls; developers integrating with terms templates should instead use the corresponding public OKC APIs. The package relies on MO_GLOBAL and HR_OPERATING_UNITS for multi-org context resolution, meaning callers must ensure the correct operating unit is initialized via FND_GLOBAL before execution to obtain accurate validation and security behavior.