Search Results okc_rep_imp_documents_t




Overview

OKC_REP_IMP_DOCUMENTS_T is a temporary staging table within the OKC (Contracts Core) schema in Oracle EBS 12.1.1 and 12.2.2. It stores attributes of imported Contract Documents during bulk import processes, enabling the application to validate each incoming document record and generate error messages for invalid entries. The table is transient by design: its contents are purged after each import run, so it should never be treated as a persistent system of record.

The table is registered as VALID in the OKC schema and is owned by the Contracts Core product. Its documented physical structure in ETRM 12.2.2 comprises 17 columns, with a primary key constraint OKC_REP_IMP_DOCUMENTS_T_PK1 on IMP_DOCUMENT_ID, and a unique index OKC_REP_IMP_DOCUMENTS_T_U1 on the same column. Under a heuristic Data Vault classification, this table is best modeled as a standalone structure — it functions as a staging/satellite-style container for imported contract document attributes, with a single foreign-key relationship to OKC_REP_IMP_CONTRACTS_T (via IMP_CONTRACT_ID) rather than participating in a broader hub-and-link network.

Key Information Stored

The most significant columns capture the imported document's identity, its parent contract reference, validation state, and audit context:

  • IMP_DOCUMENT_ID — Surrogate primary key and unique business-key candidate (index OKC_REP_IMP_DOCUMENTS_T_U1); identifies each staged document record.
  • IMP_CONTRACT_ID — Foreign key to OKC_REP_IMP_CONTRACTS_T; links the document to its imported parent contract.
  • CONTRACT_ID — Actual contract identifier used when the record is ultimately applied.
  • DOCUMENT_INDEX — Sequence/position of the document within the contract's document set.
  • CATEGORY_CODE, CATEGORY_NAME_TXT — Document category identifiers used for classification and validation.
  • FILE_TYPE_CODE, FILE_TYPE_MEANING — File format/type descriptors for the uploaded document.
  • FILE_NAME — Name of the source document file being imported.
  • DOCUMENT_DESC — Free-text description of the document.
  • VALID_FLAG — Validation outcome flag indicating whether the record passed import validation.
  • CREATION_DATE — Timestamp of record creation during the import staging cycle.
  • Audit/context columns PROGRAM_ID, PROGRAM_LOGIN_ID, PROGRAM_APPLICATION_ID, REQUEST_ID, and RUN_ID — identify the concurrent program, application, user login, request, and run that produced each staged record, supporting diagnostics and error tracing.

Common Use Cases and Queries

The primary use case is diagnosing bulk import failures. Because invalid rows remain in the table until the process clears them, support and technical teams can query rejected records and their error context immediately after an import run.

  • Identify invalid staged documents: SELECT IMP_DOCUMENT_ID, IMP_CONTRACT_ID, FILE_NAME, CATEGORY_CODE, VALID_FLAG FROM OKC.OKC_REP_IMP_DOCUMENTS_T WHERE VALID_FLAG = 'N';
  • Trace an import batch by concurrent request: SELECT * FROM OKC.OKC_REP_IMP_DOCUMENTS_T WHERE REQUEST_ID = :request_id AND RUN_ID = :run_id;
  • Join to the parent import contract to see grouped failures: SELECT d.IMP_DOCUMENT_ID, d.FILE_NAME, c.CONTRACT_ID FROM OKC.OKC_REP_IMP_DOCUMENTS_T d, OKC.OKC_REP_IMP_CONTRACTS_T c WHERE d.IMP_CONTRACT_ID = c.IMP_CONTRACT_ID;
  • Reporting on import throughput per program/login using PROGRAM_ID, PROGRAM_LOGIN_ID, and CREATION_DATE groupings.

Because data is deleted after each import, these queries are only meaningful during or immediately after a run; archived extracts should be captured if trend reporting is required.

Related Objects

The most significant related objects, based on documented relationships, include:

  • OKC_REP_IMP_CONTRACTS_T — Parent staging table; joined via OKC_REP_IMP_DOCUMENTS_T.IMP_CONTRACT_ID.
  • AMS_IMP_DOCUMENTS — References this table via IMP_DOCUMENT_ID, linking the AMS import layer to the OKC staging record.
  • OKC_REP_IMP_DOCUMENTS_T_PK1 and OKC_REP_IMP_DOCUMENTS_T_U1 — Primary and unique constraints governing record identity.
  • OKC Contracts Core base document tables (the eventual targets of validated records once staged data is applied).
  • The Contract Documents import concurrent program and its associated request/run identifiers, which orchestrate the staging cycle.