Search Results inv_org_id




Overview

OKX_CONTRACTS_V is a public view owned by the APPS schema in Oracle E-Business Suite, delivered as part of the OKX – Contracts Integration product family. The ETRM metadata lists the object with status VALID and describes its purpose simply: "Thi view stores contract header information." It exposes a denormalized, reporting-friendly projection of contract header records held in the Oracle Contracts (OKC) base tables, supplying the contract identity, descriptive text, effective date window, lifecycle status, and several integration-specific attributes such as SCS_CODE and STS_CODE. Because OKX is the integration layer through which contracts are exchanged with external or downstream systems — order management, procurement, and service modules among them — this view functions as the canonical read interface for contract header data used by concurrent programs, interfaces, and ad hoc reporting rather than as a transactional entity in its own right.

Underlying Base Objects

The documented base objects are OKC_K_HEADERS_B and OKC_K_HEADERS_TL, both referenced through synonyms in the APPS schema. OKC_K_HEADERS_B is the Contracts header entity table, holding the operational attributes: contract number and modifier, start and end dates, authoring organization, inventory organization, buy-or-sell indicator, currency, contract type, and the SCS_CODE and STS_CODE integration columns. OKC_K_HEADERS_TL is the translation table, providing language-specific descriptive text keyed by contract ID and language. The view joins the two on CHR.ID = TL.ID and restricts the translation row with TL.LANGUAGE = USERENV('LANG'), so each session sees contract descriptions in its own language. Only one row per contract is returned, because the language predicate collapses the translation table to a single row per header.

Key Columns

  • NAME — Contract number composed with DECODE logic that appends a period and the contract number modifier when a modifier exists.
  • DESCRIPTION — The short description from OKC_K_HEADERS_TL, resolved for the session language.
  • START_DATE_ACTIVE / END_DATE_ACTIVE — The contract's effective start and end dates.
  • STATUS — Derived status computed against SYSDATE: 'I' for inactive (before start or after end) and 'A' for active within the window.
  • SCS_CODE / STS_CODE — Integration status codes carried directly from the header. STS_CODE is the value most frequently targeted by integration queries.
  • ORG_ID — Authoring organization ID; INV_ORG_ID — inventory organization ID.
  • BUY_OR_SELL, CURRENCY_CODE, CHR_TYPE — Commercial direction, currency, and contract type.
  • PRIMARY_UOM_CODE — Exposed as NULL; present for interface-shape compatibility only.

Common Use Cases and Queries

The view is typically used to report active contract coverage, to drive outbound integration extracts, and to reconcile contract status between EBS and external systems. A frequent pattern filters on status or date windows:

  • SELECT name, description, sts_code, start_date_active FROM okx_contracts_v WHERE status = 'A';
  • SELECT name, sts_code FROM okx_contracts_v WHERE sts_code IS NOT NULL AND org_id = :org_id;
  • SELECT chr_type, currency_code, COUNT(*) FROM okx_contracts_v GROUP BY chr_type, currency_code;

Because STATUS is computed at runtime from SYSDATE, queries spanning long historical periods should apply explicit date predicates on START_DATE_ACTIVE and END_DATE_ACTIVE rather than relying on STATUS alone. Joins to OKC_K_HEADERS_B or to OKX line and pricing views are performed on the header ID; note that the view's ID1 column supplies this key even though it is not listed among the reported output columns.