Search Results oks_copy_contract_pvt




Overview

OKC_CAC_PVT is a private PL/SQL package in the APPS schema that supports the contract access control and version-management infrastructure of the Oracle Contracts (OKC) module in Oracle E-Business Suite 12.1.1 and 12.2.2. Its name reflects its role: "CAC" denotes Contract Access Control, and "PVT" is the standard Oracle naming classification for a private API package whose interfaces are intended for internal consumption by other contract APIs rather than for direct caller invocation. The package centralizes the row-level DML, locking, validation, and versioning logic that public contract APIs such as OKC_CONTRACT_PUB and OKC_CONTRACT_PVT depend upon.

Because access control in Contracts is tied to resource and group ownership stored in OKC_K_ACCESSES and its history table, OKC_CAC_PVT acts as the single point of enforcement for granting, changing, and revoking contract-level access while preserving the versioning semantics required by the Contracts version model.

Key Procedures and Functions

The package exposes fifteen documented procedures and functions. Their documented purposes are as follows:

  • QC — Internal quality-control/consistency routine used to verify package-level state or assumptions during execution.
  • CHANGE_VERSION — Alters the version context associated with a contract access control record.
  • API_COPY — Copies access control records from a source contract (or version) to a target, supporting contract duplication and version creation.
  • INSERT_ROW — Inserts a new access control row into the contract access structures.
  • LOCK_ROW — Acquires a row-level lock on an access control record to serialize concurrent modification.
  • UPDATE_ROW — Updates an existing access control row.
  • DELETE_ROW — Removes an access control row.
  • VALIDATE_ROW — Performs attribute and referential validation before DML is committed.
  • CREATE_VERSION — Creates a new versioned set of access control records, typically in conjunction with contract version creation.
  • RESTORE_VERSION — Reinstates access control records from a prior version, supporting version rollback or restoration.

Detailed parameter lists are intentionally omitted; callers should rely on the documented dependency graph rather than assuming signatures.

Tables Accessed

The package reads and writes through APPS synonyms for the following tables:

  • OKC_K_ACCESSES and OKC_K_ACCESSES_V — The primary contract access control table and its view, holding party and resource access grants.
  • OKC_K_ACCESSES_H — The history/audit table capturing prior states of access records across versions.
  • OKC_K_HEADERS_B — The contract header base table, used to contextualize access records against a specific contract.
  • JTF_RS_GROUPS_B and JTF_RS_RESOURCE_EXTNS — Resource manager group and resource extension tables, resolving valid grantees for access control.
  • PLITBLM — The standard Oracle PL/SQL table-of-varchar2 utility structure used for arrayed processing.

Usage Notes

OKC_CAC_PVT is a private package and is referenced by ten other packages, most notably OKC_CONTRACT_PUB, OKC_CONTRACT_PVT, OKC_CONTRACT_PVT_W, OKC_COPY_CONTRACT_PUB, OKC_COPY_CONTRACT_PVT, OKC_DELETE_CONTRACT_PVT, OKC_VERSION_PVT, and the Service (OKS) counterparts OKS_COPY_CONTRACT_PVT, OKS_EXTWARPRGM_PVT, and OKS_RENCPY_PVT. It is therefore invoked indirectly whenever a user creates, copies, deletes, or re-versions a contract through the Contracts forms or through the public contract APIs. Custom code should not call OKC_CAC_PVT directly; instead, callers should use the corresponding public APIs (OKC_CONTRACT_PUB, OKC_COPY_CONTRACT_PUB) to preserve access control and versioning integrity. Direct modification of OKC_K_ACCESSES without routing through this package risks orphaned history rows and inconsistent version state.