Search Results okx_order_headers_v




Overview

OKS_ORDER_V is a read-only database view owned by the APPS schema within the OKS (Service Contracts) product family in Oracle E-Business Suite 12.1.1 and 12.2.2. Its documented purpose is to expose contract details by joining service-contract order metadata to the underlying order-header, order-line, and inventory-item definitions maintained by Oracle Order Management and Oracle Inventory. Because service contracts are not standalone sales documents, they rely on order lines originating in the order capture flow; OKS_ORDER_V reconciles the contract-side key (OKS_K_ORDER_DETAILS) against those operational entities so that contract start and end dates, item identity, and order/line identifiers appear in a single relational result set.

The view is most commonly used for reporting and integration rather than transactional processing. The presence of the OBJECT_VERSION_NUMBER column signals an optimistic-locking convention inherited from the Order Capture and Contract foundation layer, and the view participates in the same currency as that layer.

Underlying Base Objects

The view text joins four sources with an implicit inner-join semantics:

  • OKS_K_ORDER_DETAILS (exposed as a synonym in APPS) — the driving contract-side table, providing the contract ID, the order-line cross reference, and the object version number.
  • OKX_ORDER_LINES_V — the Order Capture order-lines view, supplying line number, inventory item, service start/end dates, header linkage, and the ID1 surrogate.
  • OKX_ORDER_HEADERS_V — the Order Capture order-headers view, supplying ORDER_NUMBER.
  • OKX_SYSTEM_ITEMS_V — the item master view supplying the item NAME and organization scoping.

The documented referenced objects also include the ASO_ORDER_INT package and, critically, OKC_CONTEXT. OKC_CONTEXT is the session package that publishes the ORG_ID and ORGANIZATION_ID values consumed by the WHERE clause through SYS_CONTEXT calls. This means the view is multi-org and inventory-org aware: it returns only rows matching the caller's current operating unit and organization context. Querying outside an initialized OKC context can therefore yield zero rows even when data exists.

Key Columns

  • ID — the identifier from OKS_K_ORDER_DETAILS, the contract-detail key.
  • ORDER_LINE_ID1 — the contract-side cross reference to the order line; converted with TO_NUMBER before matching OKX_ORDER_LINES_V.ID1.
  • ORDER_NUMBER — the human-readable sales order number from the header view.
  • LINE_NUMBER — the order line number within that order.
  • NAME — the inventory item description or name delivered by OKX_SYSTEM_ITEMS_V.
  • SERVICE_START_DATE / SERVICE_END_DATE — the contractual service coverage window sourced from the order line.
  • OBJECT_VERSION_NUMBER — the row version stamp used for optimistic locking in the underlying Order Capture framework.

Common Use Cases and Queries

Typical scenarios include contract coverage reporting (which item is serviced, over what period), reconciliation between service contracts and their originating order lines, and extracting contract data into a data warehouse or interface. Because the view enforces OU and inventory-org context, reports should be run only after the application session has initialized OKC_CONTEXT.

A representative query lists all contract-linked order lines visible to the current context:

  • SELECT order_number, line_number, name, service_start_date, service_end_date FROM apps.oks_order_v WHERE service_end_date >= SYSDATE ORDER BY order_number, line_number;
  • SELECT order_number, line_number, name, id, object_version_number FROM apps.oks_order_v WHERE name LIKE :item_pattern;

For period-based entitlement analysis, join or filter on SERVICE_START_DATE and SERVICE_END_DATE. For integration extracts, restrict with ORDER_NUMBER or ID for deterministic, restartable slices, and avoid selecting all rows without a context-bearing filter, as the SYS_CONTEXT predicates will otherwise return an empty result set rather than an error.