Search Results source_header_number




Overview

APPS.WSH_PURGE_SOURCE_NUMBERS_V is a lightweight Oracle EBS view in the Shipping (WSH) module whose purpose is to expose the distinct set of source document numbers referenced by delivery details. In Oracle EBS 12.1.1 and 12.2.2, delivery details are linked back to their originating source transaction — a sales order (source code 'OE') or a purchase order (source code 'PO') — through the SOURCE_CODE and SOURCE_HEADER_NUMBER columns of WSH_DELIVERY_DETAILS. This view distills those columns into a compact, deduplicated list.

The view is primarily a supporting/utility object for purge and cleanup processes. The naming convention ("PURGE_SOURCE_NUMBERS") indicates that it is intended to feed purging routines with the set of source header numbers that must be considered when archiving or removing shipping data. Because it returns only distinct values, it is also convenient for validation, reconciliation, and reporting where a distinct list of sourced order or PO numbers associated with deliveries is required. The user's search term, source_header_number, maps directly to the central column this view projects.

Underlying Base Objects

The view is defined over two documented referenced objects:

  • WSH_DELIVERY_DETAILS (SYNONYM) — the primary base object. This is the core Shipping table that stores individual delivery detail lines and their links to source transactions. The view selects exclusively from this object, filtering by SOURCE_CODE and projecting the source identifiers.
  • WSH_LOOKUPS (VIEW) — referenced as a supporting lookup object. WSH_LOOKUPS resolves shipping lookup codes (for example the meanings of source systems such as 'OE' and 'PO').

The documented view text is minimal and directly joins no tables explicitly; the predicate restricts the result to the two shipping source systems, and the DISTINCT clause removes duplicate (source_code, source_header_number) combinations. Note that the alias mapping collapses SOURCE_HEADER_NUMBER into both SOURCE_ID and SOURCE_NUMBER, so these two output columns carry identical values.

Key Columns

  • source_system — aliased from SOURCE_CODE; identifies the originating application of the delivery. Only two values are returned by this view: OE (Order Entry / Sales Orders) and PO (Purchasing / Purchase Orders).
  • source_id — aliased from SOURCE_HEADER_NUMBER; the source document header number treated as an identifier for the originating order or PO.
  • source_number — also aliased from SOURCE_HEADER_NUMBER; a second projection of the same header number, provided for naming consistency with purge/reporting parameters.

Because all three columns derive from two physical columns, the view does not expose delivery-level detail such as quantity, delivery ID, or line number. It is deliberately narrow to keep purge processing efficient.

Common Use Cases and Queries

Typical uses include purge preparation, reconciliation, and audit reporting. To list all distinct source header numbers by source system:

  • SELECT source_system, source_id FROM apps.wsh_purge_source_numbers_v ORDER BY source_system, source_id;
  • SELECT source_system, COUNT(*) FROM apps.wsh_purge_source_numbers_v GROUP BY source_system;
  • SELECT source_id FROM apps.wsh_purge_source_numbers_v WHERE source_system = 'OE' ORDER BY source_id;

Because the view performs no aggregation beyond DISTINCT and applies a fixed predicate, it can be joined back to WSH_DELIVERY_DETAILS for drill-down. In 12.1.1 and 12.2.2 the definition and behavior are consistent; performance depends on the indexes supporting SOURCE_CODE and SOURCE_HEADER_NUMBER on the base table.