Search Results po_sgd_linelocs_v




Overview

PO_SGD_LINELOCS_V is an APPS-owned, VALID view in the Oracle E-Business Suite Purchasing (PO) module. Its name follows the Oracle "SGD" (Schema Generation / DDL and data migration) convention used to support Oracle's cross-schema data migration and comparison utilities. Rather than presenting rows in the traditional columnar shape of PO_LINE_LOCATIONS_ALL, this view flattens each purchasing document's shipment line into a key/value (entity-attribute-value) result set, one row per attributable column. Each row identifies the owning purchasing entity through a fixed key hierarchy (PK1_VALUE through PK5_VALUE) and exposes a single attribute through COL_NAME and its corresponding textual representation through COL_VALUE.

In Oracle EBS 12.1.1 and 12.2.2 this view sits alongside other PO_SGD_*_V views used by the schema-generation and data-migration toolset to serialize purchasing entities for transport between environments or releases. It is not a general-purpose reporting view; it is a migration and comparison artifact, and the source column list is dominated by TO_CHAR conversions to render every attribute as a string.

Underlying Base Objects

The documented base objects referenced by PO_SGD_LINELOCS_V are:

The view therefore joins logically to line-location data via PO_HEADER_ID, PO_LINE_ID, and LINE_LOCATION_ID, and to draft data via DRAFT_ID (nulls defaulting to -1).

Key Columns

  • PK1_VALUE–PK5_VALUE — the composite entity key: PO_HEADER_ID, DRAFT_ID, PO_LINE_ID, LINE_LOCATION_ID, and a placeholder NULL for the fifth key. Together they uniquely identify the shipment row for a given attribute.
  • COL_NAME — the attribute name, e.g. SHIPMENT_NUM, NEED_BY_DATE, QUANTITY, UNIT_MEAS_LOOKUP_CODE, MATCH_OPTION, ACCRUE_ON_RECEIPT_FLAG.
  • COL_VALUE — the attribute value rendered as a character string via TO_CHAR.
  • COL_DESC — a decoded description; currently populated only for UNIT_MEAS_LOOKUP_CODE, where the unit of measure name is resolved from MTL_UNITS_OF_MEASURE_TL for the session language (USERENV('LANG')).

Common Use Cases and Queries

The primary use is migration comparison. A typical query retrieves the full attribute set for a given shipment:

SELECT pk1_value, pk2_value, pk3_value, pk4_value, col_name, col_value, col_desc
FROM po_sgd_linelocs_v
WHERE po_header_id = :header_id AND po_line_id = :line_id AND line_location_id = :loc_id;

A secondary use targets a single attribute, for example resolving the unit of measure and its translated description:

SELECT col_value, col_desc FROM po_sgd_linelocs_v
WHERE col_name = 'UNIT_MEAS_LOOKUP_CODE' AND pk4_value = :loc_id;

Because the view serializes every column as text, it is suitable for pivoting into a columnar representation or for feeding the PO_GEN_DIFF_PKG comparison routines, but it should not be used as a substitute for PO_LINE_LOCATIONS_ALL in operational reporting.