Search Results okc_sections_b




Overview

The OKC_SECTIONS_B table is a core data object within the Oracle E-Business Suite Contracts Core (OKC) module. It serves as the primary repository for contract section definitions. As indicated by the provided ETRM metadata, sections are fundamentally used to format and organize the clauses of a contract document for printing and presentation purposes. This table stores the structural framework of a contract, enabling the logical grouping of clauses (stored in related tables like OKC_K_ARTICLES_B) into a coherent, hierarchical document. Its role is critical for generating formal contract deliverables and ensuring the contractual text is structured according to business and legal requirements.

Key Information Stored

The table's primary key is the ID column, uniquely identifying each section record. The metadata highlights several crucial foreign key relationships that define the table's context. The CHR_ID column links a section to its parent contract header record in the OKC_K_HEADERS_B table, establishing the contract to which the section belongs. The SCN_ID column is a self-referencing foreign key, enabling the creation of nested, hierarchical section structures (e.g., sections within sections). Other significant columns, inferred from standard OKC schema patterns and the foreign key relationships, typically include data such as the section sequence number (for ordering), section code and title, effective dates, and a version number to support contract amendments and revisions over time.

Common Use Cases and Queries

A primary use case is generating a formatted contract document for review or execution. This involves querying the section hierarchy along with associated clauses and their text. Common reporting needs include listing all sections for a specific contract or identifying the structure of standard contract templates. Sample SQL patterns often involve hierarchical queries using CONNECT BY or recursive WITH clauses on the SCN_ID self-join, joined to the contract header and article tables.

  • Retrieve Section Hierarchy for a Contract: SELECT level, scn.id, scn.section_code FROM okc_sections_b scn START WITH scn.chr_id = &contract_id AND scn.scn_id IS NULL CONNECT BY PRIOR scn.id = scn.scn_id ORDER SIBLINGS BY scn.sequence_number;
  • List Top-Level Sections with Child Count: SELECT s1.id, s1.section_code, (SELECT COUNT(*) FROM okc_sections_b s2 WHERE s2.scn_id = s1.id) child_section_count FROM okc_sections_b s1 WHERE s1.chr_id = &contract_id AND s1.scn_id IS NULL;

Related Objects

As defined by the foreign keys in the metadata, OKC_SECTIONS_B has integral relationships with several key Contracts Core tables. The OKC_K_HEADERS_B table is the primary parent, storing the contract header. The OKC_K_ARTICLES_B table stores the individual clauses (articles) that are assigned to a specific section via the SCN_ID foreign key. The OKC_SECTION_CONTENTS table, also referencing OKC_SECTIONS_B via SCN_ID, manages the detailed content and formatting rules for sections. The self-referencing foreign key (OKC_SECTIONS_B to OKC_SECTIONS_B) is essential for managing the section hierarchy itself. These relationships collectively form the backbone of the contract document model in Oracle EBS.