Search Results okc_allowed_tmpl_usages




Overview

OKC_ALLOWED_TMPL_USAGES is a table in the OKC (Contracts Core) schema of Oracle E-Business Suite. It stores the association between contract templates and the document types that are permitted to use them. In EBS Contracts, a template defines reusable clause content and default values, while the document type classifies the business document being authored (for example, a sales agreement, purchase agreement, or other contract classification). The OKC_ALLOWED_TMPL_USAGES table acts as the authoring-time eligibility map: when a user creates a contract of a given document type, the template selection list (LOV) is filtered by the records present here. Without a corresponding row, a template is not offered for that document type.

Mined from its foreign key structure, the heuristic Data Vault classification for this table is link. This is a reasonable modeling suggestion: the table resolves a many-to-many relationship between two business entities (templates and document types) rather than functioning as a descriptive hub or a fully attributed satellite. It is also a configuration table, populated during implementation or template maintenance rather than at transactional runtime.

Key Information Stored

The table contains 26 documented columns, dominated by the standard EBS WHO columns and a fifteen-column ATTRIBUTE flex set. The most significant columns are:

The documented business-key candidate is the unique index OKC_ALLOWED_TMPL_USAGES_U1 on (TEMPLATE_ID, DOCUMENT_TYPE). This composite constraint enforces that a template may be associated with a given document type only once, whereas the surrogate ALLOWED_TMPL_USAGES_ID remains the technical PK.

Common Use Cases and Queries

The primary functional use is controlling template availability in the Contracts authoring UI. Implementation teams seed rows here when deploying templates to specific business document types. Typical queries include:

  • Determining which templates are eligible for a document type:
    SELECT t.template_id, t.name FROM okc_terms_templates_all t, okc_allowed_tmpl_usages u WHERE t.template_id = u.template_id AND u.document_type = :p_doc_type;
  • Identifying the default template for each document type:
    SELECT document_type, template_id FROM okc_allowed_tmpl_usages WHERE default_yn = 'Y';
  • Auditing unused templates, i.e. templates with no allowed-usage rows, or orphaned usage rows whose TEMPLATE_ID no longer resolves in OKC_TERMS_TEMPLATES_ALL.
  • Reporting template coverage across document types for governance or migration planning.

Because the table is low-volume configuration data, join-and-report queries are inexpensive and are commonly used in custom template administration pages or reconciliation scripts during upgrades from 12.1.1 to 12.2.2.

Related Objects

The following objects are the most significant in relation to this table:

  • OKC_TERMS_TEMPLATES_ALL — parent of the TEMPLATE_ID foreign key; holds template definitions.
  • OKC_BUS_DOC_TYPES_B — parent of the DOCUMENT_TYPE foreign key; holds business document type definitions.
  • OKC_BUS_DOC_TYPES_TL — translated document type names, joined via DOCUMENT_TYPE for reporting.
  • OKC_ALLOWED_TMPL_USAGES_PK and OKC_ALLOWED_TMPL_USAGES_U1/U2 — the PK and unique indexes enforcing row identity and the template/document-type business key.
  • OKC_TEMPLATE_UTIL and the Contracts authoring APIs — application logic that reads these rows to build template LOVs.
  • OKC_TERMS_TEMPLATES_B / _TL — base and translated template tables that complete the join path for descriptive reporting.