Results for “contract_status_code”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKS_ENT_K_STATUS_V is a view owned by the APPS schema within the OKS – Service Contracts module of Oracle E-Business Suite (12.1.1 and 12.2.2). Its documented description is concise: it lists all statuses of the contract. The view is a lightweight, denormalized representation of contract header status information, joining the contract header record to the FND_LOOKUPS view so that a user-friendly status meaning is returned alongside the internal status code.

Its primary role is reporting and integration. Rather than requiring callers to join OKC_K_HEADERS_ALL_B to FND_LOOKUPS manually, the view encapsulates the lookup join (LOOKUP_TYPE = 'OKC_STATUS_TYPE') and exposes a flattened result set. This makes it convenient for BI Publisher reports, OAF/ADF customizations, inbound/outbound interfaces, and ad hoc SQL where a contract's current status code and description are required. Because the status code is exposed under the column name CONTRACT_STATUS_CODE, the view is a common target when users or developers search for "contract_status_code" in an ETRM or service contracts context.

Underlying Base Objects

The view text is defined over two objects:

  • OKC_K_HEADERS_B (referenced as the synonym OKC_K_HEADERS_ALL_B / APPS.OKC_K_HEADERS_B HDR) — the contract header base table that supplies AUTHORING_ORG_ID, ID, CONTRACT_NUMBER and STS_CODE.
  • FND_LOOKUPS (FND) — the standard Oracle lookups view, filtered on LOOKUP_TYPE = 'OKC_STATUS_TYPE', which supplies the MEANING column.

The documented metadata also lists FND_GLOBAL (PACKAGE) among the referenced base objects, consistent with standard EBS multi-org views that rely on FND_GLOBAL for operating unit or org context. The join condition aliases FND.MEANING as CONTRACT_STATUS_NAME, and the header's STS_CODE as CONTRACT_STATUS_CODE. No status history, versioning, or child-line status is included; the view reports only the current header-level status.

Key Columns

  • ORG_ID — sourced from HDR.AUTHORING_ORG_ID; the authoring/operating unit organization identifier for the contract.
  • CONTRACT_ID — sourced from HDR.ID; the unique contract header identifier (surrogate key) used to join to other OKC/OKS objects.
  • CONTRACT_NUMBER — sourced from HDR.CONTRACT_NUMBER; the user-visible contract number.
  • CONTRACT_STATUS_CODE — sourced from HDR.STS_CODE; the internal status code value validated against lookup type OKC_STATUS_TYPE (for example the code behind statuses such as Entered, Active, Expired, Terminated, Cancelled).
  • CONTRACT_STATUS_NAME — sourced from FND.MEANING; the translated display meaning of the status code, suitable for reporting without additional lookup resolution.

Common Use Cases and Queries

The view is typically used to produce contract status listings and to drive status-dependent logic. A basic status report by organization and contract number follows:

  • SELECT org_id, contract_number, contract_status_code, contract_status_name FROM apps.oks_ent_k_status_v;
  • SELECT contract_id, contract_number, contract_status_name FROM apps.oks_ent_k_status_v WHERE contract_status_code = :p_status_code;
  • SELECT contract_status_code, contract_status_name, COUNT(*) FROM apps.oks_ent_k_status_v GROUP BY contract_status_code, contract_status_name;
  • SELECT s.contract_number FROM apps.oks_ent_k_status_v s WHERE s.org_id = :p_org_id AND s.contract_status_name = 'Active';

Typical scenarios include: filtering contracts by status for a Service Contracts dashboard; feeding a status code into a workflow or interface that expects the OKC_STATUS_TYPE lookup code; and validating that a given contract number resolves to the expected status name. Because ORG_ID derives from the authoring organization, multi-org aware queries should filter or restrict on ORG_ID where operating unit security applies. For historical status changes, users must query the underlying status history tables (such as OKC_K_HEADERS_B combined with status history objects); this view exposes only the current header status.