Search Results okc_k_headers_tlh




Overview

OKC_K_HEADERS_TLH is a history (audit) table that resides in the OKC schema, the Contracts Core product of Oracle E-Business Suite. It is the historical counterpart of OKC_K_HEADERS_TL, the translatable (multi-language) base table that stores the descriptive, language-dependent attributes of contract headers. Whenever a row in the base translation table is modified, the prior version is preserved in this history table so that a full, versioned audit trail of contract header text is retained.

The object is documented as VALID in ETRM for both 12.1.1 and 12.2.2, with 18 columns and a composite primary key OKC_K_HEADERS_TLH_PK defined on (ID, LANGUAGE, MAJOR_VERSION). Heuristic Data Vault classification mined from the foreign-key structure returns standalone; that is, it does not behave as a natural hub or link, but rather functions as a satellite-style history store keyed by the parent contract, language, and version. This classification is offered as a modeling suggestion only, not a documented EBS constraint.

Key Information Stored

The 18 documented columns fall into a clear pattern: three keying/versioning columns, the descriptive payload, and standard audit columns.

  • ID – Part of the composite primary key; identifies the parent contract header (the same ID used in OKC_K_HEADERS_TL and OKC_K_HEADERS_B).
  • LANGUAGE – Part of the primary key; the NLS language of the stored text.
  • MAJOR_VERSION – Part of the primary key; the version number that distinguishes each historical snapshot of the same (ID, LANGUAGE).
  • SOURCE_LANG and SFWT_FLAG – Source language indicator and the "Seed For Web Translation" flag used by the translation framework.
  • SHORT_DESCRIPTION, DESCRIPTION, and COMMENTS – The principal user-entered descriptive text of the contract header, preserved historically.
  • COGNOMEN – The naming/alias attribute carried on the header.
  • NON_RESPONSE_REASON, NON_RESPONSE_EXPLAIN, SET_ASIDE_REASON – Contract-specific qualifiers capturing why a party did not respond and any set-aside justification.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN – Standard EBS who-did-what audit columns.
  • SECURITY_GROUP_ID – Foreign key to FND_SECURITY_GROUPS; enforces row-level security grouping.

The unique index OKC_K_HEADERS_TLH_U1 on (ID, LANGUAGE, MAJOR_VERSION) mirrors the primary key and acts as the business-key candidate. Because it is a history table, the effective business key is the parent contract header plus the version, not a new surrogate.

Common Use Cases and Queries

Because it holds point-in-time snapshots, this table is used for audit, change tracking, and delta reporting rather than for current-data reads. Typical scenarios include comparing the current header description to its preceding version, reconstructing who changed contract text and when, and auditing descriptive fields across all versions of a contract.

A pattern for retrieving the change history of one contract header:

SELECT h.id, h.language, h.major_version,
       h.short_description, h.description,
       h.last_updated_by, h.last_update_date
FROM   okc.okc_k_headers_tlh h
WHERE  h.id = :p_contract_id
ORDER BY h.major_version;

A pattern for locating the most recent historical version per contract and comparing it with the live row:

SELECT t.id, t.language,
       t.description           AS current_desc,
       h.description           AS prior_desc,
       h.major_version
FROM   okc.okc_k_headers_tl t,
       okc.okc_k_headers_tlh h
WHERE  t.id = h.id
AND    t.language = h.language
AND    h.major_version = (SELECT MAX(h2.major_version)
                          FROM   okc.okc_k_headers_tlh h2
                          WHERE  h2.id = t.id
                          AND    h2.language = t.language);

Such queries support contract compliance reporting, change-log extracts for legal review, and reconciliation between staging and production during data migration.

Related Objects

  • OKC_K_HEADERS_TL – The translatable base table whose rows this table versions; joined on ID and LANGUAGE.
  • OKC_K_HEADERS_B – The single-language base table that owns the common header columns; joined on ID.
  • OKC_K_HEADERS_V – The view that typically synthesizes base and translation data for application use.
  • FND_SECURITY_GROUPS – Referenced via SECURITY_GROUP_ID for row-level security.
  • OKC_K_LINES_B / OKC_K_LINES_TL – Contract line tables linked to the same header ID, useful when building contract history reports.
  • OKC_K_HEADERS_HIST – Related history/audit structure for header-level attribute tracking (where present).