Search Results okc_allowed_tmpl_usages_u2
Overview
OKC.OKC_ALLOWED_TMPL_USAGES is a transactional configuration table in the Oracle E-Business Suite Contract Core (OKC) schema that defines which contract document types are permitted to be generated from a given contract template. Each row establishes an allowed association between a template (TEMPLATE_ID) and a business document type (DOCUMENT_TYPE), and optionally flags whether that template is the default for the document type. The table resides in the APPS_TS_TX_DATA tablespace and is registered in FND Design Data as OKC.OKC_ALLOWED_TMPL_USAGES. In EBS 12.1.1 and 12.2.2 the object carries a VALID status and is a foundational reference for template selection logic during contract authoring.
Within the documented relationship model, the table participates in a foreign-key relationship to OKC_TERMS_TEMPLATES_ALL and OKC_BUS_DOC_TYPES_B. Under a heuristic Data Vault classification, this table is best modeled as a link, since it resolves a many-to-many association between a contract template entity and a business document type entity, with additional descriptive attributes (DEFAULT_YN and descriptive flexfield columns) behaving like link-level satellite context.
Key Information Stored
- ALLOWED_TMPL_USAGES_ID — the surrogate primary key (OKC_ALLOWED_TMPL_USAGES_PK) and unique identifier for each usage record. It is also the single-column candidate in the OKC_ALLOWED_TMPL_USAGES_U2 unique index.
- TEMPLATE_ID — identifier of the contract template; a foreign key to OKC_TERMS_TEMPLATES_ALL. Combined with DOCUMENT_TYPE it forms the business-key candidate in the OKC_ALLOWED_TMPL_USAGES_U1 unique index.
- DOCUMENT_TYPE — the document that may be created using the template (for example a Standard Purchase Order or Sales Agreement); foreign key to OKC_BUS_DOC_TYPES_B. Also carries the non-unique OKC_ALLOWED_TMPL_USAGES_N1 index for reverse lookups by type.
- DEFAULT_YN — flag (Y/N) indicating whether the template is the default for the associated document type.
- OBJECT_VERSION_NUMBER — optimistic locking version column used by the application layer.
- CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN — standard "Who" audit columns tracking row lifecycle.
- ATTRIBUTE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE15 — descriptive flexfield (DFF) columns enabling customer-defined extensions, with the category column qualifying the attribute set.
Common Use Cases and Queries
The primary application use case is determining which templates are valid for a chosen document type, and selecting the default template when generating a contract or agreement. Reporting queries typically join this table to its parent template and document-type tables.
SELECT t.template_name, a.document_type, a.default_yn
FROM okc_allowed_tmpl_usages a,
okc_terms_templates_all t
WHERE a.template_id = t.template_id
AND a.document_type = :p_document_type;
SELECT template_id
FROM okc_allowed_tmpl_usages
WHERE document_type = :p_document_type
AND default_yn = 'Y';
Additional scenarios include validating template-to-document configurations during implementation, auditing default template assignments, and extracting DFF attribute values for compliance reporting. The N1 index supports efficient filtering by DOCUMENT_TYPE, while the U1 index enforces that a template cannot be associated twice with the same document type.
Related Objects
- OKC_TERMS_TEMPLATES_ALL — parent template table; joined on TEMPLATE_ID.
- OKC_BUS_DOC_TYPES_B — business document type definitions; joined on DOCUMENT_TYPE.
- OKC_ALLOWED_TMPL_USAGES_U1 — unique index on (TEMPLATE_ID, DOCUMENT_TYPE), enforcing business-key uniqueness.
- OKC_ALLOWED_TMPL_USAGES_U2 — unique index on ALLOWED_TMPL_USAGES_ID supporting the primary key.
- OKC_ALLOWED_TMPL_USAGES_N1 — non-unique index on DOCUMENT_TYPE.
- OKC_ALLOWED_TMPL_USAGES_PK — primary key constraint on ALLOWED_TMPL_USAGES_ID.
- The OKC contract templates and contracting APIs, which consume this table to resolve valid template selections at runtime.
-
INDEX: OKC.OKC_ALLOWED_TMPL_USAGES_U2
12.1.1
owner:OKC, object_type:INDEX, object_name:OKC_ALLOWED_TMPL_USAGES_U2, status:VALID,
-
INDEX: OKC.OKC_ALLOWED_TMPL_USAGES_U2
12.2.2
owner:OKC, object_type:INDEX, object_name:OKC_ALLOWED_TMPL_USAGES_U2, status:VALID,
-
TABLE: OKC.OKC_ALLOWED_TMPL_USAGES
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_ALLOWED_TMPL_USAGES, object_name:OKC_ALLOWED_TMPL_USAGES, status:VALID,
-
TABLE: OKC.OKC_ALLOWED_TMPL_USAGES
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_ALLOWED_TMPL_USAGES, object_name:OKC_ALLOWED_TMPL_USAGES, status:VALID,
-
12.1.1 DBA Data
12.1.1
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1
-
12.2.2 DBA Data
12.2.2
-
eTRM - OKC Tables and Views
12.1.1
description: Intersection entity between templates and rules. ,
-
eTRM - OKC Tables and Views
12.2.2
description: Intersection entity between rules and templates ,