Search Results delete_cancel_contract




Overview

OKC_REP_CONTRACT_IMP_PUB is a public PL/SQL API package owned by the APPS schema and supplied as part of the Oracle E-Business Suite Contracts (OKC) module, specifically the repository contract import and maintenance subsystem. It provides a programmatic interface for creating, modifying, and removing repository contracts from external or staged data sources. The package is defined with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the calling schema rather than the definer, which is a common convention for EBS public APIs that must respect the caller's security context.

The header comment of the package explains its central design intent: when the p_create_contract flag is TRUE, a contract is created directly through the API; when set to FALSE, the data is only dumped into the interface tables, and the CP Import Repository Contract concurrent program must subsequently be run to complete contract creation. This dual-mode behavior allows bulk imports to be staged and validated before being committed to the contract repository.

Key Procedures and Functions

  • CREATE_CONTRACT — Creates a contract from data supplied in the parameter structures. Two documented overloads exist: one that accepts contract header, party, contact, and risk collections, and one that additionally accepts a parent document record whose relationship is stored in the OKC_REP_CONTRACT_USAGES table. This is the primary entry point for importing new repository contracts.
  • DELETE_CONTRACT — Deletes the contract identified by the supplied contract ID. This is the documented deletion routine for contracts that can be physically removed.
  • DELETE_CANCEL_CONTRACT — The procedure matching the user's search term. It performs a combined delete-and-cancel operation, removing the contract and processing its cancellation in a single call. This is typically used when a contract must be terminated and its records purged rather than retained in a cancelled state.
  • CANCEL_CONTRACT — Cancels a contract without deleting it, preserving the record for audit and history while terminating its active status.
  • CREATE_NEW_CONTRACT_VERSION — Produces a new version of an existing contract, supporting the versioning model used by repository contracts.
  • CHECK_CONTRACT_EXISTS — Validation routine that determines whether a contract already exists, allowing callers to avoid duplicate creation.
  • ACTIVATE_TASKS_CLOSEOUT — Activates the closeout process for the tasks associated with a contract, supporting contract completion workflows.

Tables Accessed

The package references the following tables through APPS synonyms:

  • OKC_REP_IMPORT_RUN_ID_S — A sequence used to generate unique import run identifiers, ensuring that each import batch is traceable through the interface tables.
  • DUAL — Used for single-row query operations such as sequence value retrieval and validation checks.

In addition, the package's declared record types are supplied by OKC_IMP_RECORD_TYPES, and the parent-document relationship captured during import is written to OKC_REP_CONTRACT_USAGES as documented in the package header.

Usage Notes

OKC_REP_CONTRACT_IMP_PUB is invoked by the repository contract import concurrent program (CP Import Repository Contract) and by internal EBS code, including three other packages that reference it. Custom integrations and extensions commonly call CREATE_CONTRACT to load contracts from external systems, setting p_create_contract to FND_API.G_FALSE to stage data for the concurrent import, or to FND_API.G_TRUE for immediate creation. The DELETE_CANCEL_CONTRACT and CANCEL_CONTRACT procedures are the supported mechanisms for terminating contracts programmatically, and should be preferred over direct DML against the underlying OKC tables to ensure that all dependent records, audit columns, and API validations are handled correctly. Standard FND_API conventions apply: callers must inspect x_return_status, x_msg_count, and x_msg_data, and control transaction boundaries through the p_commit parameter.