Search Results okc_rep_contract_imp_pub




Overview

The APPS.OKC_REP_CONTRACT_IMP_PUB package body is a public (PUB) API within the Oracle E-Business Suite Contracts (OKC) module, specifically supporting the Contracts Repository (Rep) import functionality. Its primary business function is to provide the programmatic interface for importing and managing contracts derived from external sources or interface tables into the ETRM (Enterprise Contracts) repository. The package acts as a wrapper and controller around the CP (Contracts) Import process, orchestrating the creation, modification, cancellation, and deletion of contract records while enforcing API validation standards defined by OKC_API and FND_API.

As evidenced by the source header (OKCPREPIMPB.pls), the package maintains a strict API contract using standardized global constants for return statuses (G_RET_STS_SUCCESS, G_RET_STS_ERROR, G_RET_STS_UNEXP_ERROR), SQL error tokens, and organization context. This structure ensures consistent error handling and message propagation when invoked by concurrent programs or custom integrations. The package is classified as a PUBLIC API, meaning it is intended for external invocation by other Oracle modules or customer extensions, rather than being restricted to internal package use.

Key Procedures and Functions

The ETRM metadata documents eleven procedures and functions, with the following core public routines exposed for contract import operations:

  • CREATE_CONTRACT — The primary entry point for contract creation. The source indicates a Boolean parameter p_create_contract that controls behavior: when true, a contract is created directly; when false, data is only dumped to interface tables, requiring the CP Import Repository Contract concurrent program to subsequently create the contract. It accepts an API version and a contract record type (OKC_IMP_RECORD_TYPES.contract_rec_type) along with a parties table.
  • DELETE_CONTRACT — Removes a contract record from the repository, typically used to purge erroneously imported or obsolete contracts.
  • CREATE_NEW_CONTRACT_VERSION — Generates a new version of an existing contract, supporting version-controlled contract amendments and revisions.
  • CHECK_CONTRACT_EXISTS — Validates whether a given contract already exists in the system, preventing duplicate imports and supporting idempotent integration logic.
  • ACTIVATE_TASKS_CLOSEOUT — Activates and manages task closeout activities associated with a contract, ensuring downstream task lifecycles are correctly triggered.
  • CANCEL_CONTRACT — Cancels an active contract without deleting it, preserving audit history while terminating the agreement.
  • DELETE_CANCEL_CONTRACT — Combines deletion and cancellation logic, likely invoked when a contract must be both terminated and removed from active views.

Parameter lists are not exhaustively documented in the provided metadata; consultants should reference the full PL/SQL specification (OKCPREPIMPB.pls) for exact signatures. All procedures follow the FND_API standard, returning status codes and error messages via the standard API return mechanism.

Tables Accessed

The package references the following tables via APPS synonyms:

  • OKC_REP_IMPORT_RUN_ID_S — A sequence used to generate unique run identifiers for each import execution, ensuring traceability and auditability of batch import operations.
  • DUAL — Utilized for singleton SELECT statements, typically for sequence value retrieval, date checks, or validation logic.

The source excerpt also reveals indirect dependency on OKC_API for constants and error messages. The interface tables (referenced in the p_create_contract logic) are populated when direct creation is bypassed, but their names are not enumerated in the provided metadata.

Usage Notes

This package is typically invoked in three scenarios: (1) through the CP Import Repository Contract concurrent program, which processes records staged in interface tables; (2) from custom PL/SQL integrations that call CREATE_CONTRACT directly with p_create_contract => TRUE; and (3) from corrective or maintenance scripts requiring contract cancellation or deletion. It is referenced by three other packages, indicating a layered dependency within the OKC module. Developers must initialize the organization context (G_CURRENT_ORG_ID) and adhere to FND_API message handling conventions. Because it is a PUBLIC API, it is safe for customer extensions in EBS 12.1.1 and 12.2.2, though the package header should always be checked for signature stability across patch levels.