Search Results order_comment




Overview

The GR_SALES_ORDER_FLEX_V view belongs to the Process Manufacturing Regulatory Management (GR) product family within Oracle E-Business Suite and resides in the APPS schema. Its documented purpose is to present a consolidated picture of sales order number, line number, order comments, a descriptive name, and item number. The view serves as a flexible reporting interface that merges order and delivery information originating from the Oracle Order Management and shipping execution tables with equivalent data drawn from the process manufacturing order tables (OP_ORDR_HDR, OP_ORDR_DTL, OP_BILL_LAD, and IC_ITEM_MST).

In the 12.1.1 and 12.2.2 releases the object is reported as VALID. Users searching for the term "order_comment" typically encounter this view because ORDER_COMMENT is one of its five projected columns, making it a convenient single source for retrieving comment text alongside the corresponding order and item identifiers.

Underlying Base Objects

The view text is a UNION of two SELECT statements. The first branch joins the following documented base objects: OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL, WSH_DELIVERY_DETAILS, WSH_DELIVERY_ASSIGNMENTS, WSH_NEW_DELIVERIES, MTL_SYSTEM_ITEMS, and HR_ALL_ORGANIZATION_UNITS, all accessed through APPS synonyms. This branch links header, line, and delivery detail records via HEADER_ID, LINE_ID, and DELIVERY_DETAIL_ID, applying an outer join to WSH_NEW_DELIVERIES. It restricts results by matching MTL_SYSTEM_ITEMS.ORGANIZATION_ID to HR_ALL_ORGANIZATION_UNITS.ORGANIZATION_ID and by comparing the organization name to the FND_PROFILE value of GR_WHSE_DEFAULT, thereby scoping output to the default regulatory warehouse.

The second branch operates over the process manufacturing tables OP_ORDR_HDR, OP_ORDR_DTL, OP_BILL_LAD, and IC_ITEM_MST, joining on ORDER_ID, FROM_WHSE, and BOL_ID, with a filter that excludes records where DELETE_MARK is not zero. An outer join to OP_BILL_LAD permits bill-of-lading data to be absent. The two branches are combined and ordered by the first two columns.

Key Columns

  • ORDER_NO — The sales order number. In the first branch it is derived by converting OE_ORDER_HEADERS_ALL.ORDER_NUMBER to a character value; in the second it comes directly from OP_ORDR_HDR.ORDER_NO.
  • LINE_NO — A numeric concatenation of line number and shipment number (LINE_NUMBER||'.'||SHIPMENT_NUMBER) from Order Management, or the process manufacturing line number.
  • ORDER_COMMENT — The order comment. The Order Management branch substitutes a single space, while the process branch returns the actual ORDER_COMMENT value from OP_ORDR_HDR.
  • NAME — A descriptive identifier: the delivery name from WSH_NEW_DELIVERIES in the first branch, or the bill-of-lading number (BOL_NO) from OP_BILL_LAD in the second.
  • ITEM_NO — The item identifier, sourced from MTL_SYSTEM_ITEMS.SEGMENT1 or IC_ITEM_MST.ITEM_NO.

Common Use Cases and Queries

Typical usage centers on reporting order lines together with delivery or bill-of-lading references and item numbers. Because ORDER_COMMENT is exposed directly, the view is frequently used to surface comment text for order tracking, compliance review, or regulatory documentation.

A representative query retrieving comment information for a specific order is:

  • SELECT order_no, line_no, order_comment, name, item_no FROM apps.gr_sales_order_flex_v WHERE order_no = :p_order_no;
  • SELECT order_no, line_no, order_comment, item_no FROM apps.gr_sales_order_flex_v WHERE order_comment IS NOT NULL ORDER BY order_no, line_no;

Because the Order Management branch hard-codes a space for ORDER_COMMENT, comment values are populated only for process manufacturing records. Consumers should account for this behavior when combining branches, particularly in environments where both order management and process manufacturing activity coexist.