Search Results okc_contract_docs_u1




Overview

OKC.OKC_CONTRACT_DOCS is a transactional table within the Oracle E-Business Suite Contracts (OKC) schema. It serves as an intermediate repository used by the Contract Documents feature to record Business Document attachment entries. While the underlying file content and attachment metadata are held in the FND Attachment schema (specifically FND_ATTACHED_DOCUMENTS), OKC_CONTRACT_DOCS extends that model with columns that do not exist in the standard FND attachment tables. The most notable of these are EFFECTIVE_FROM_TYPE, EFFECTIVE_FROM_ID, and EFFECTIVE_FROM_VERSION, which allow Business Document attachments to be versioned by reference to a source document, and EXTERNAL_VISIBILITY_FLAG, reserved for future exposure control.

The object is classified, as a heuristic modeling suggestion, as standalone under Data Vault conventions — it does not sit cleanly inside a hub/link/satellite chain driven by its own foreign keys, because its relationships are expressed through polymorphic identifiers and lookups (BUSINESS_DOCUMENT_TYPE, EFFECTIVE_FROM_TYPE) rather than through a single rigid parent FK. It can be treated as a link-like association table between business documents and FND attachments, carrying satellite-style attributes such as flags and version references. In EBS 12.1.1 and 12.2.2 it carries Status VALID and resides in the APPS_TS_TX_DATA tablespace, with indexes in APPS_TS_TX_IDX. The documented physical schema lists 24 columns.

Key Information Stored

The table's identity and its most significant attributes are as follows:

  • BUSINESS_DOCUMENT_TYPE – VARCHAR2(30); foreign key to OKC_BUS_DOC_TYPES. Determines which class of contract business document the attachment belongs to.
  • BUSINESS_DOCUMENT_ID – NUMBER; the unique identifier of the business document instance.
  • BUSINESS_DOCUMENT_VERSION – NUMBER; the version of the business document against which the attachment is registered.
  • ATTACHED_DOCUMENT_ID – NUMBER; foreign key to FND_ATTACHED_DOCUMENTS, linking this row to the actual attachment record and its stored file.
  • EFFECTIVE_FROM_TYPE, EFFECTIVE_FROM_ID, EFFECTIVE_FROM_VERSION – together they reference the source document from which this attachment is versioned.
  • PARENT_ATTACHED_DOC_ID – NUMBER; identifies the parent document, supporting hierarchical attachment relationships.
  • INCLUDE_FOR_APPROVAL_FLAG – indicates whether the attachment participates in the contract approval cycle.
  • GENERATED_FLAG – indicates whether the attachment was auto-generated by the application rather than uploaded.
  • DELETE_FLAG – logical deletion indicator, used with the nonunique index OKC_CONTRACT_DOCS_N1 to filter active rows.
  • PRIMARY_CONTRACT_DOC_FLAG and MERGEABLE_DOC_FLAG – control whether the document is the principal contract document and whether it may be merged into output.

The surrogate primary key is OKC_CONTRACT_DOCS_UK1 over (BUSINESS_DOCUMENT_TYPE, BUSINESS_DOCUMENT_ID, BUSINESS_DOCUMENT_VERSION, ATTACHED_DOCUMENT_ID). Two unique indexes act as business-key candidates over the same four columns in differing order — OKC_CONTRACTS_DOCS_U1 and OKC_CONTRACT_DOCS_U1 (the latter is the object referenced by the search term "okc_contract_docs_u1") — while OKC_CONTRACT_DOCS_N1 supports selective retrieval by document type, ID, version, and DELETE_FLAG.

Common Use Cases and Queries

Typical usage centers on reconciling the OKC attachment registry with the FND attachment store, reporting which documents are flagged for approval, and tracing versioned references through EFFECTIVE_FROM columns. A common join pattern is:

  • Join OKC_CONTRACT_DOCS to FND_ATTACHED_DOCUMENTS on ATTACHED_DOCUMENT_ID = FND_ATTACHED_DOCUMENTS.ATTACHED_DOCUMENT_ID to retrieve file names, media IDs, and datatypes.
  • Join to OKC_BUS_DOC_TYPES on BUSINESS_DOCUMENT_TYPE to resolve the business document classification.
  • Filter on DELETE_FLAG = 'N' to exclude logically deleted attachments, and on INCLUDE_FOR_APPROVAL_FLAG = 'Y' for approval-cycle reporting.
  • Group by BUSINESS_DOCUMENT_ID and BUSINESS_DOCUMENT_VERSION to count attachments per contract version, or use EFFECTIVE_FROM_VERSION to analyze reference-versioning behavior.
  • Identify auto-generated artifacts with GENERATED_FLAG = 'Y' for automation audits, and locate parent/child structures via PARENT_ATTACHED_DOC_ID self-joins.

Related Objects

  • FND_ATTACHED_DOCUMENTS – the authoritative attachment registry; joined via ATTACHED_DOCUMENT_ID.
  • OKC_BUS_DOC_TYPES – lookup of business document types; parent of BUSINESS_DOCUMENT_TYPE.
  • FND_DOCUMENTS / FND_DOCUMENT_ENTITIES – hold the document and entity metadata underlying the FND attachment chain.
  • OKC_CONTRACT_DOCS (self-reference) – via PARENT_ATTACHED_DOC_ID for hierarchical attachments.
  • OKC_BUSINESS_DOCUMENTS / business document base tables – resolve BUSINESS_DOCUMENT_ID to the owning contract and version.
  • OKC_APPROVAL_* objects – consume INCLUDE_FOR_APPROVAL_FLAG during contract approval processing.
  • OKC_CONTRACT_DOCS_UK1, OKC_CONTRACTS_DOCS_U1, OKC_CONTRACT_DOCS_U1, OKC_CONTRACT_DOCS_N1 – the supporting indexes defining uniqueness and query access paths.