Search Results okc_k_history_b




Overview

The OKC_K_HISTORY_B table is a core data object within the Oracle E-Business Suite Contracts Core (OKC) module. It functions as the central audit and tracking repository for a contract's operational lifecycle. The table systematically records a chronological history of all significant status transitions and actions performed on a contract header or its individual lines. This persistent history is critical for compliance, audit reporting, troubleshooting, and providing a complete audit trail of the contract's evolution from creation through amendment to closure.

Key Information Stored

The table's primary purpose is to capture the details of each state change or action. While the full column list is extensive, the most critical fields, as indicated by its foreign key relationships, include the unique record identifier (ID), the contract header identifier (CHR_ID), and the contract line identifier (CLE_ID). Crucially, it stores the status codes before (STS_CODE_FROM) and after (STS_CODE_TO) a change, linked to the OKC_STATUSES_B table. It also records the specific operation code (OPN_CODE) that triggered the history entry, linked to OKC_OPERATIONS_B. Additional columns typically capture the date and time of the action, the user who performed it, and descriptive comments regarding the change.

Common Use Cases and Queries

A primary use case is generating audit reports to trace the complete status history of a specific contract for internal reviews or external audits. Support and implementation teams query this table to diagnose issues by understanding the sequence of events leading to a contract's current state. Common SQL patterns involve joining to the contract headers and status tables to produce human-readable reports.

  • Status History Report for a Contract: SELECT h.CHR_ID, s_from.NAME status_from, s_to.NAME status_to, h.CREATION_DATE FROM OKC_K_HISTORY_B h, OKC_STATUSES_B s_from, OKC_STATUSES_B s_to WHERE h.STS_CODE_FROM = s_from.CODE AND h.STS_CODE_TO = s_to.CODE AND h.CHR_ID = :p_chr_id ORDER BY h.CREATION_DATE;
  • Identifying All Contracts with a Specific Status Transition: SELECT DISTINCT k.CONTRACT_NUMBER FROM OKC_K_HISTORY_B h, OKC_K_HEADERS_B k WHERE h.CHR_ID = k.ID AND h.STS_CODE_FROM = 'ENTERED' AND h.STS_CODE_TO = 'SIGNED';

Related Objects

The OKC_K_HISTORY_B table is integrally connected to other core Contracts tables through documented foreign key relationships, forming the backbone of the module's data model.

  • OKC_K_HEADERS_B: Linked via OKC_K_HISTORY_B.CHR_ID. This is the primary relationship, anchoring each history record to a specific contract.
  • OKC_K_LINES_B: Linked via OKC_K_HISTORY_B.CLE_ID. This allows the table to also track history at the individual contract line level.
  • OKC_STATUSES_B (Two Relationships): Linked via OKC_K_HISTORY_B.STS_CODE_FROM and OKC_K_HISTORY_B.STS_CODE_TO. These joins provide the meaningful description for the status codes stored.
  • OKC_OPERATIONS_B: Linked via OKC_K_HISTORY_B.OPN_CODE. This join defines the specific business operation (e.g., "AMEND", "TERMINATE") that caused the history entry.