Search Results lty_code




Overview

OKX_PRODUCT_LINES_V is a reporting and integration view owned by the APPS schema in Oracle E-Business Suite, assigned to the OKX – Contracts Integration product. Its documented purpose is to expose "Contract lines" in a denormalized form suitable for downstream consumption by contracts integration flows and operational reporting. The view consolidates contract line attributes, line-style attributes, and inventory item details into a single flat row per contract line item, allowing consumers to retrieve pricing, item, quantity, and status information without navigating the normalized OKC contract schema directly.

The view is particularly relevant when searching for lty_code. LTY_CODE is a column physically defined on OKC_LINE_STYLES_B and is surfaced directly through this view, making it the canonical access point for line-type classification on OKX contract lines.

Underlying Base Objects

The ETRM 12.2.2 metadata documents the following referenced base objects, all resolved as APPS synonyms except where noted:

The joins are inner joins throughout, so a contract line appears only when a matching translated line, line style, licensed-product item, and system item all exist.

Key Columns

  • ID1 / ID2 – ID1 carries B.ID (the contract line identifier); ID2 is a constant '#'.
  • LTY_CODE – the line type code derived from OKC_LINE_STYLES_B, the primary line classification attribute.
  • LSE_TYPE / LSE_PARENT_ID – the line style type and its parent hierarchy reference.
  • NAME, DESCRIPTION, ITEM_DESCRIPTION, COMMENTS – descriptive text, with NAME resolved from the translated line or system item.
  • CHR_ID / DNZ_CHR_ID – contract header identifiers linking the line to its parent contract.
  • LINE_NUMBER, START_DATE_ACTIVE, END_DATE_ACTIVE, DATE_TERMINATED – line sequencing and effective dating.
  • STATUS – a derived DECODE returning 'A' (active) or 'I' (inactive) based on SYSDATE against the start and end dates.
  • INVENTORY_ITEM_ID, ORGANIZATION_ID, QUANTITY, UNIT_OF_MEASURE_CODE, ITEM_NAME – inventory item context, with '#' in OBJECT1_ID2 normalized to –99 for ORGANIZATION_ID.
  • PRIMARY_UOM_CODE – exposed as NULL.

Common Use Cases and Queries

Typical usage includes reporting contract lines by line type, auditing active versus inactive lines, and feeding integration processes that require item and quantity details per contract line. To retrieve lines filtered by line type code:

  • SELECT lty_code, line_number, name, quantity, unit_of_measure_code, status FROM okx_product_lines_v WHERE lty_code = :p_lty_code;
  • SELECT chr_id, line_number, inventory_item_id, quantity FROM okx_product_lines_v WHERE status = 'A' ORDER BY chr_id, line_number;
  • SELECT lty_code, COUNT(*) FROM okx_product_lines_v GROUP BY lty_code;

Users should note the inner joins and the OKX_LICPROD restriction: only licensed-product contract lines are returned, and any missing style or item reference will exclude the row entirely.