Search Results okc_terms_templates_all_u2




Overview

OKC.OKC_TERMS_TEMPLATES_ALL is the master repository for contract templates within the Oracle E-Business Suite Contracts (OKC) module, commonly referred to as Enterprise Contracts. It stores every contract template definition along with its governing attributes, including the template name, validity dates, intent (Buy or Sell), status, globalization settings, and workflow integration points. In Oracle EBS 12.1.1 and 12.2.2, this table functions as the anchor object from which the Contracts Authoring and Template Management workflows derive reusable clause structures, numbering schemes, and print layouts deployed across operating units.

The table resides in the APPS_TS_TX_DATA tablespace and is owned by the OKC schema, with FND Design Data registered as OKC.OKC_TERMS_TEMPLATES_ALL. It carries the ORG_ID column, making it a multi-org (partitioned by operating unit) object in the R12 data model. From a Data Vault modeling perspective, the heuristic classification issued for this object is hub-leaning, reflecting that TEMPLATE_ID behaves as a durable business key referencing long-lived template entities, while mutable descriptive attributes such as STATUS_CODE, HIDE_YN, and the audit columns behave satellite-like. The metadata documents 50 columns in total for release 12.2.2.

Key Information Stored

The surrogate primary key is TEMPLATE_ID (NUMBER), enforced by the unique index OKC_TERMS_TEMPLATES_ALL_U1. Business-key uniqueness is enforced through the composite unique index OKC_TERMS_TEMPLATES_ALL_U2 across ORG_ID, TEMPLATE_NAME, and WORKING_COPY_FLAG, ensuring no duplicate template names within an operating unit for the same working-copy state.

Common Use Cases and Queries

Typical reporting scenarios include listing approved, currently effective templates by operating unit, tracing version hierarchy through PARENT_TEMPLATE_ID, and reconciling template usage against contract instances.

Retrieving all active global templates:

SELECT template_id, template_name, intent, status_code
FROM okc.okc_terms_templates_all
WHERE org_id = :p_org_id AND status_code = 'APPROVED'
AND SYSDATE BETWEEN start_date AND NVL(end_date, SYSDATE+1)
AND global_flag = 'Y';

Identifying working copies versus published templates uses WORKING_COPY_FLAG. Translation tracking joins TRANSLATED_FROM_TMPL_ID to TEMPLATE_ID within the same table. Numbering-scheme audit joins OKC_NUMBER_SCHEMES_B on TMPL_NUMBERING_SCHEME. Because the table is multi-org, all operational queries should filter or initialize ORG_ID via MO_GLOBAL or a session-bound operating unit.

Related Objects

  • OKC.OKC_ALLOWED_TMPL_USAGES — references TEMPLATE_ID; defines which contract categories or usage contexts may apply a given template.
  • OKC.OKC_TEMPLATE_USAGES — references TEMPLATE_ID; records actual usage of templates against contract documents.
  • OKC.OKC_TEMPLATE_USAGES_H — the history/audit counterpart of OKC_TEMPLATE_USAGES, also keyed to TEMPLATE_ID.
  • OKC.OKC_TERMS_TEMPLATES_ALL — self-referencing on PARENT_TEMPLATE_ID for version lineage.
  • OKC.OKC_NUMBER_SCHEMES_B — referenced through TMPL_NUMBERING_SCHEME for document numbering configuration.

Together these objects support template definition, authorization, usage tracking, and version control across the Enterprise Contracts module in both EBS 12.1.1 and 12.2.2.