Search Results okc_delete_contract_pvt




Overview

OKC_DELETE_CONTRACT_PVT is a private PL/SQL package in the APPS schema that belongs to the Oracle Contracts (OKC) module of Oracle E-Business Suite. It is part of the ETRM (Enterprise Trade and Contract Management) family of APIs used by the Oracle Contract Management application to manage the lifecycle of contracts. The _PVT suffix indicates that the package is a private implementation package: it is not intended for direct invocation by external consumers, and its logic is exposed to the public API surface through the wrapper package OKC_DELETE_CONTRACT_PUB.

The business function of this package is to encapsulate the low-level database operations required to delete a contract from the system. Deleting a contract is not a simple row removal; it requires the coordinated removal of the contract header, the associated contract lines, the ancestry/relationship records that link the contract to its parent or related agreements, and any dependent data maintained elsewhere in the Contracts data model. The package consolidates this logic so that the public deletion API can call it in a controlled, transactional manner.

Key Procedures and Functions

The ETRM documentation records a single documented procedure for this package:

  • DELETE_CONTRACT — The core deletion routine. This procedure performs the actual removal of contract data from the underlying tables. It is the private implementation that supports the public deletion entry point exposed by OKC_DELETE_CONTRACT_PUB. By design, it operates on the contract identifier passed from the calling layer and applies the deletion logic across the header, line, and ancestry structures. Parameter details are not enumerated in the ETRM metadata and should be confirmed by inspecting the package body in the target environment.

Because only one procedure is documented, the package’s role is narrow and focused on the delete operation. Other lifecycle operations (create, update, copy) reside in separate packages within the OKC API set.

Tables Accessed

The following tables are documented as being referenced through APPS synonyms by this package:

  • OKC_K_HEADERS_B — The base table that stores contract header information. The delete routine uses this table to identify and remove the contract’s header record, which is the central entity of a contract.
  • OKC_K_LINES_B — The base table holding contract lines (line items). Deletion of a contract requires removal of all associated lines; this table is the target for that portion of the logic.
  • OKC_ANCESTRYS — The table that maintains hierarchical relationships between contracts, such as parent-child or related agreement links. The delete routine removes ancestry records so that the contract is cleanly detached from any hierarchy before or during removal.

The package also depends on OKC_API and OKC_CONTRACT_PUB, indicating that it leverages shared contract API utilities and the public contract programmatic interface rather than issuing standalone SQL for every operation.

Usage Notes

OKC_DELETE_CONTRACT_PVT is not client-facing. It is referenced by OKC_DELETE_CONTRACT_PUB, which is the public API that forms, concurrent programs, or custom integrations should call. It is also referenced by its own package specification and body, reflecting internal recursion or helper calls.

Typical invocation paths include the Contract Management forms when a user initiates a deletion, and any batch or concurrent process that programmatically removes contracts. Direct calls to the private package are discouraged because doing so bypasses the validation, concurrency control, and security logic implemented in the public wrapper. Oracle’s standard guidance for the OKC API family applies: use the public _PUB package and let it delegate to this private routine within a single transaction to preserve data integrity. Because the package touches base tables and ancestry records, any custom code that bypasses the API risks leaving orphaned child records or broken hierarchy references.