Skip to Content
Author's profile photo Marcus Zahn

Monday Knowledge Snippet (MKS) – 44 Distance Determination without Location Coordinates

Following up on post MKS 20, this MKS is an update on what happened in the meanwhile and brings live to a real example.

Remember, the requirement was to do a detailed and high quality distance determination between locations without the need to geo-code them (so basically all locations are geo-coded on country or country – region level meaning that a lot of locations share the same coordiantes). For example having a distance matrix at hand based on postal codes, or location SCAC codes, it is in standard SAP TM still required to have the locations enriched with distinct coordinates to access the data source. The suggestions made in MKS 20 worked for some customers, but we thought it would be great to enhance the framework.

Going for the approach to use artificial coordinates seemed to be the most efficient way to solve this issue. But this required some adjustments to the GIS integration framework. First of all it answered location pairs having the same coordinates very early with a distance of zero, what is good for performance. But as this can now lead to other results, it was necessary to pass all of those requests through the framework. Next step was enabling the adjustment of the location data. So far only the distance requests and results where passed, but to add artificial coordinates requires to have this data within the determination method.

Those adjustments are available with the SCMB notes:

1997058 Distance Determination not possible for locations with same coordinates

1999615 Distance Determination: Location data can not be adjusted

In my test scenario, I have created locations spread all over Germany, gave them postal codes (~9000), but left the geo-coordinates on country level. Then I implemented the access to a postal code based distance matrix having results for all combinations.

DDD_02_PostalCodes_All.jpg

I setup a custom distance determination strategy and assigned it to my means-of-transport. For each location I added unique artifical coordinates (simply a counter 1,2,3…) and added this information to the location data passed through the framework. Then I determined my results, mapped this back into the standard result table based on coordiantes using my just created coordinates, and here we go – the distance was used all over SAP TM!

How it can be done is covered in a solution concept attached to note 2001921 – Distance Determination for SAP Transportation Management using
Location Attributes (always newest up-to-date version).

Feedback is very welcome!

Marcus

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marcus Zahn
      Marcus Zahn
      Blog Post Author
      Author's profile photo Former Member
      Former Member

      Hello Marcus,

      It seems like the note is not available yet...

      Rgs, Marcelo Lauria

      Document is not released


      Author's profile photo Marcus Zahn
      Marcus Zahn
      Blog Post Author

      Was released today, not sure how much time that takes through...

      Author's profile photo Former Member
      Former Member

      Hello Marcus, it´s available now!

      Rgs, Marcelo Lauria

      Author's profile photo Murugesh Karunamurthy
      Murugesh Karunamurthy

      we wanted to decide the duration based on the service level, how can we do this ?

      For example: distance is fixed , same Means of transport

      Standard - 3 days

      Express - 1 day

      Author's profile photo Marcus Zahn
      Marcus Zahn
      Blog Post Author

      This must be done on business document level. The distance determination is a generic framework woring on locations and some means of transport attributes, but no business document information.

      An alternative would be to use 2 MTRs.

      Author's profile photo Former Member
      Former Member

      I´d suggest the use of 2 MTRs like Marcus said...Best Regards. Marcelo