Introduction to Travel Distance Calculation
Note
The executing resources is not known until the warehouse order is confirmed. Then, the system can access more detailed information, such as:
The last position of the resource prior to executing the warehouse order
The travel network allowed for the resource
The travel distance is calculated for the storage bin list. The system generates the list of storage bins from the warehouse order creation rules. The order is fixed, meaning the travel distance calculation does not change the sequence of storage bins.
The system differentiates between horizontal (X and Y coordinates) and vertical movements (Z coordinates). For the movements, we assume the following:The total travel distance in a vertical direction therefore corresponds to twice the Z distance of the storage bins to the floor (point of origin Z = 0).
The resource visits each storage bin in the sequence defined by the list.
The resource executes the horizontal movement first, meaning the resource first moves to the storage bin in a horizontal direction.
The resource then executes the vertical movement, namely the movement from the floor to the bin and back.
The resource then moves to the next storage bin in a horizontal direction.
Types of Distance

SAP EWM uses two different methods for the distance calculation:
Direct distance:
The system calculates the travel distance using the direct distance, based on either the Euclidean metric or Manhattan metric. The upper part of the following figure shows the direct distance between two storage bins of a storage type. The solid line corresponds to the Euclidean metric; the dotted line represents the Manhattan metric.
Distance based on networks:
The travel distance calculation can also be based on an existing valid network. The valid routes represent the edges. The lower part of the following figure shows the distance between two storage bins of a storage type. The resource moves across the valid routes.
Introduction to Networks
Networks define the valid routes (paths) in the warehouse on which the resources move. A network consists of edges and nodes. Edges are connected to each other by way of nodes. Edges represent the valid routes in the warehouse, and nodes represent crossings.
There are two different kinds of networks:
- Storage-type-specific networks:
These networks consist of edges that map the individual aisles, and edges that represent a connection of different aisles. You assign storage bins of a storage type to:
- An edge, if the storage bins are located in an aisle, and an edge exists for the aisle.- A node that matches your X and Y coordinates, if you have not assigned an edge. - Global networks:
The global network connects the defined, storage-type-specific networks to each other. If no storage-type-specific networks are defined, the network connects the storage bins to each other directly.

Edges have the following properties:
Each edge has a start node and end node.
An edge is usually passable in both directions, however it can also be defined as a one-way street. The direction is defined through the start and end nodes.
For each edge, you can define which resource types are allowed to pass.
You can assign an edge to an aisle.
An edge has a length that is used by the system to calculate the travel distance, if the edge is passed by a resource.
The Definition of Networks
You can use the program, Generating Storage-Type-Specific Networks to automatically generate storage- type-specific networks for the travel distance calculation in SAP EWM. On the SAP EWM Index screen, choose Extended Warehouse Management → Settings → Travel Distance Calculation → Generate Network.
The edges generated for the aisles automatically have the following properties:
Edges are only created for aisles that have more than one storage bin.
Edges can be passed in both directions.
The length of the edges corresponds to the Euclidean distance between the start and end nodes.
If storage bins are located on both sides of the aisle, the edges are located in the center of the aisle.
If there are only storage bins on one side of the aisle, the edges lie half a bin depth away from the aisle.
The edges start and end outside the aisle (half a bin depth).
The system generates connecting edges between neighboring aisles by connecting both the start and end nodes of two neighboring aisles with an edge.
The storage-type specific network can also be created manually, but it is possible and therefore better to change settings like the direction (unidirectional, bidirectional) after the generation by the system. You can also exclude resource types from edges. In addition, you can add an average distance for a storage type. This is the distance that is used when the resource and the start point is not known. (Actually, this setting has to be done in Customizing of the storage type, it is only displayed here.)
You can define global networks manually and make the following settings for the edges:
Enter X and Y coordinates for the start of the edge.
Enter X and Y coordinates for the end of the edge.
Define edge direction (unidirectional, bidirectional).
Define edge length in the unit of length of the warehouse number.
Define excluded resource types.
Both types of networks (storage-type specific and global) can also be uploaded using a CSV file. This feature was introduced with SAP EWM 9.5.
Direct Movements
This system uses the direct distance for the following movements:
Movements between storage bins within a storage type, if no valid storage-type-specific network is available.
Movements between storage bins from different storage types, if no global valid network exists.
Movements within an aisle. Here, the direct distance between storage bins is used to calculate the travel distance.

The figure called Direct Movements within an Aisle, shows examples for travel distances between multiple storage bins within an aisle. The yellow line represents the Euclidean metric; the dotted blue line represents the Manhattan metric.
Connecting Storage Bins to the Network
Storage bins are connected to the network using either of the following:
Using the nearest node, if no edge has been assigned to the storage bin. The node comes from the storage-type-specific network, or if this does not exist, the global network.
With the nodes of an edge, if the storage bin is in an aisle, and an edge exists for the aisle. Fundamentally, four options exist. For a one-way route, only one option is allowed: entering the edge at the start node and leaving it at the end node.
The figure called Connections of Storage Bins with the Network displays how a bin sequence within an aisle can be connected with the node or nodes of the respective edge. As stated in the section above, the edge itself is not used for the calculation within an aisle, because the direct distance is used between these storage bins.

Movements Within a Network
Movements within a network take place if the storage bins are located as follows:
In the same storage type but not in the same aisle, and a valid storage-type-specific network exists.
In different storage types and a valid global network exists.
For the calculation within the network (valid global network and any existing valid storage-type-specific networks), the system connects the storage bins with the nodes of the respective edge or with the next node. Then, the travel distance within the network between the storage bins is added to the assigned nodes. Four options are available for this calculation:
- From the start node of the first edge to the start node of the second edge
- From start node to end node
- From end node to start node
- From end node to end node
Heuristics for the Travel Distance Calculation Within a Network
Two heuristics exist for the travel distance calculation within a network. The system calls both by default. You can control the heuristics using the Business Add-Ins (BAdIs) for the travel distance calculation.
Depth-first search:
This system attempts to find a route between the specified nodes of a network in the shortest time possible. Here, the search runs in the direction of start node to end node. The search finishes when the first complete route is found.
Breadth-first search:
The system looks for all possible routes in the network, and selects the one that has the shortest distance. This heuristic is more performance intensive at runtime, and is only appropriate for small networks.
The Business Add-Ins (BAdIs) that are available for you to define your own logic for the travel distance calculation are the following:
Change Storage Bin List for Travel Distance Calculation /SCWM/EX_TDC_BIN_LIST
With this BAdI you can do the following:
- Sort the list
- Delete storage bins from the list
- Add new storage bins to the list
- Influence the default distance to the first storage bin in the storage bin list
Travel Distance Calculation Using Storage Bins /SCWM/EX_TDC_START
The system calls this BAdI to calculate the travel distance of a warehouse order. If you implement this BAdI, you can define your own logic for calculating the travel distance along the sorted storage bin list transmitted to the BAdI.


