Search Results wsh_delivery_legs




Overview

The WSH_DELIVERY_LEGS table is a core data object within the Oracle E-Business Suite Shipping Execution (WSH) module. It serves as the master table for storing delivery leg information, which represents a discrete segment of a shipment's journey. A delivery leg is defined as the movement of goods from a specific pick-up location (stop) to a specific drop-off location (stop) within the context of a larger trip. This table is fundamental for modeling multi-stop shipments, where a single delivery may be transported across multiple legs, potentially involving different carriers or modes of transport. It acts as the central link between a delivery, its assigned trip stops, and associated freight cost details, enabling detailed tracking and costing of the shipment process.

Key Information Stored

The table's primary identifier is the DELIVERY_LEG_ID. Its most critical columns establish relationships to other key shipping entities. The DELIVERY_ID column links the leg to its parent delivery in the WSH_NEW_DELIVERIES table. The PICK_UP_STOP_ID and DROP_OFF_STOP_ID columns define the leg's start and end points by referencing specific stops in the WSH_TRIP_STOPS table. While the provided metadata does not list all columns, typical implementations include attributes to record planned and actual departure/arrival dates, the leg sequence number, carrier and service level information, and status flags. This structure allows the system to manage the routing, scheduling, and execution status for each segment of a delivery.

Common Use Cases and Queries

This table is central to operational reporting and process inquiries within Shipping Execution. A common use case is generating a shipment itinerary or trip manifest, which requires joining delivery leg data with stop and delivery details. For troubleshooting, analysts query this table to identify legs associated with a delayed delivery or to audit freight costs assigned to specific shipment segments. Sample SQL to list all legs for a delivery, including stop locations, would be:

  • SELECT wdl.delivery_leg_id, wdl.delivery_id, wps.location_id pick_up_location, wds.location_id drop_off_location FROM wsh_delivery_legs wdl, wsh_trip_stops wps, wsh_trip_stops wds WHERE wdl.pick_up_stop_id = wps.stop_id AND wdl.drop_off_stop_id = wds.stop_id AND wdl.delivery_id = :p_delivery_id ORDER BY wdl.sequence_number;

Another critical use case is interfacing, as the WSH_DEL_LEGS_INTERFACE table feeds data into this base table during the shipping transaction import process.

Related Objects

The WSH_DELIVERY_LEGS table maintains documented foreign key relationships with several other WSH tables, as per the provided metadata:

  • WSH_NEW_DELIVERIES: The DELIVERY_ID column references this table, linking the leg to its parent delivery.
  • WSH_TRIP_STOPS: Referenced twice, via PICK_UP_STOP_ID and DROP_OFF_STOP_ID, to define the leg's origin and destination stops on a trip.
  • WSH_DEL_LEGS_INTERFACE: Serves as the source interface table, where its DELIVERY_LEG_ID can reference a leg created via the interface process.
  • WSH_FREIGHT_COSTS: The DELIVERY_LEG_ID in this cost table references WSH_DELIVERY_LEGS, allowing freight charges to be allocated at the individual leg level.

These relationships underscore the table's role as a nexus between delivery planning, trip scheduling, and freight costing.