Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
Spatra
Advisor
Advisor
2,515
Table of Contents

1       Introduction.

2       Technical Background

3       Setup RFC Destination to connect HSS

3.1               RFC Destination for HSS Authentication

3.2               RFC Destination for HSS Connection

4       Process Controller settings for HSS

4.1               Strategy and Method

4.2               Process Controller Parameter

4.2.1                          Define Parameter

4.2.2                          Assign Parameters to a Method

4.2.3                          Assign Method Parameters to a Strategy

5       Application configuration to use GIS service

5.1               Basic Settings

5.2               Assign Geo-Coding Strategy to Geo-Coding level

5.3               Assign Geo-Coding level to Distance and Duration Determination Strategy

5.4               Assign Geo-Routing for Map

6       Testing

7       Conclusion

8       Reference

 

1      Introduction


SAP HANA Spatial Services (HSS) with Matrix Routing capability can significantly enhance Transportation Management for SAP S/4HANA, offering various benefits to optimize routing and achieve substantial cost savings, particularly when dealing with large volumes of data.

This blog aims to elucidate the simple setup guide to integrate Transportation Management with SAP HANA spatial services (HSS), specifically focusing on applications such as Geo-Coding, Distance and Duration Determination, and Geo-Routing.

To enable the consumption of SAP HANA spatial services a subscription to an SAP HANA Spatial Service instance is required. Please refer to the respective SAP HANA Spatial Services Onboarding Guide | SAP Help Portal.

2      Technical Background


Having the HSS connector class /SCMB/CL_GIS_CONNECTOR_SCP in the system is essential. Install a service pack that includes the class or implement "SAP Note 2711181-GIS Connector SCP Spatial Services". Verify for any applicable corrections mentioned in “"SAP Note 2711181-GIS Connector SCP Spatial Services"  or available on components SCM-BAS-LDD or, more recently, TM-MD-TN-HSS. To take advantage of additional performance optimizations and new features, ensure the implementation of "SAP Note 3261879-HSS integration: performance improvements"(supported from SAP Note 2813859-SAP S/4HANA 1909 Supply Chain for Transportation Management onwards).

3      Setup RFC Destination to connect HSS


The following RFC destinations need to be maintained to enable the use of the HSS integration. An example text file snapshot for service key is shown here to help you locate the correct values.

Transaction: SM59 – Configuration of RFC Destinations

3.1       RFC Destination for HSS Authentication


Technical Settings



























RFC Destination  SCP_SPATIAL_OAUTH
Connection type  G
Description  SAP HANA spatial services OAUTH Destination
Host  “URL from service key of your HSS instance (Indicated by arrow)
Port 443
Path Prefix  /oauth/token


Fig 1: Mapping of Service key into RFC destination


Logon & Security



























Logon with User  Basic Authentication
User  “clientid” from service key of your HSS instance (Indicated by arrow)
Password  “clientsecret” from service key of your HSS instance (Indicated by arrow)
Logon with Ticket  Do Not Send Login Ticket
SSL  Active
SSL Certificate  ANONYM SSL Client


Fig 2: Mapping of Service key into RFC destination



3.2       RFC Destination for HSS Connection.


Technical Settings























RFC Destination  SCP_SPATIAL
Connection type  G
Description  SAP HANA spatial services Target Destination
Host  “URI” from service key of your HSS instance (Indicated by arrow)
Port 443


Fig 3: Mapping of Service key into RFC destination


Logon & Security



















Logon with User  Do not use a user.
Logon with Ticket  Do Not Send Login Ticket
SSL  Active
SSL Certificate  DFAULT SSL Client

   

Fig 4: Logon and Security settings for RFC destination


 

4      Process Controller settings for HSS



4.1        Strategy and Method


The HSS GIS Connection is done using the Process Controller Framework. Standard SAP delivered following strategy for DDD, Geo-Coding and Geo-Routing.


Fig 5: Strategy for DDD, Geo-Coding and Geo-Routing


The method assignment to above strategies as per following.


Fig 6: Method assignment to the strategy


The assignment of methods and classes for HANA spatial services is as follows, while the Buffer check and update method still employs the old DDD connector class.


Fig 7: HSS class and method



4.2       Process Controller Parameter


Several parameters are available, but these depend on the requirements of the GIS provider—what they need and what they can offer. I will emphasize the mandatory parameter crucial for integrating with HSS. For detailed information about all other parameters, you can refer to  "SAP Note 2751622-Setup Guide for SAP HANA Spatial Services in SCE Applications", which serves as a comprehensive setup guide for SAP TM and HSS.

4.2.1    Define Parameter.


Customizing: Transportation Management-> Basic Functions-> Process Controller-> Define Parameters

Distance and Duration

Assign parameter name SCP_SS_DD_VENDOR and SCP_SS_DD_VENDOR_P1 to the service of Distance and Duration determination DDD_DET.


Fig 8: Parameters for DDD Service


Geo-Coding

Assign parameter name SCP_SS_GC_VENDOR and SCP_SS_GC_VENDOR_P1 to the service of Geo-Coding GEO_DET.


Fig 9: Parameters for Geo-Coding Service


Geo-Routing

Assign parameter name SCP_SS_GR_VENDOR and SCP_SS_GR_VENDOR_P1 to the service of Geo-Routing GEO_ROUTE.


Fig 10: Parameters for Geo-Routing Service


As you can see in all services the parameter Vendor name and Vendor Parameter 1 is mandatory. Please keep in mind the parameter type is “Character String”.

4.2.2    Assign Parameters to a Method


Now we must assign those parameters to the method of DDD, Geo-Coding and Geo-Routing.

Customizing: Transportation Management-> Basic Functions-> Process Controller-> Assign Parameters to a Method


Fig 11: Assign parameters to Method for DDD



Fig 12: Assign parameters to Method for Geo-Coding



Fig 13: Assign parameters to Method for Geo-Routing



4.2.3    Assign Method Parameters to a Strategy


Finally, comes the significant step where we must assign these method parameters to the strategy along with their respective values.

Customizing: Transportation Management-> Basic Functions-> Process Controller-> Assign Method Parameters to a Strategy


Fig 14: Assign Method parameters to Strategy for DDD, Geo-Coding and Geo-Routing


Vendor Name:

In this example I have taken GIS vendor as “Here” which is connected to HSS.

Vendor Parameter 1:

The API key for the "Vendor Parameter 1" will depend on the type of contract you have subscribed to for utilizing HANA HSS.

If your customer already holds a license with a GIS provider, such as HERE, the value for the api_key should be the HERE API Key. Obtain this information from your provider and input it accordingly.

On the other hand, if you have an SAP Global OEM contract with HERE, the value for the api_key should be "SAP-KEY" (hardcoded).

For more information regarding contract type use the link Frequently Asked Questions for SAP HANA Spatial Services | SAP Help Portal

 

5      Application configuration to use GIS service.


A prerequisite for the usage of the HSS integration is a working setup of the GIS Integration Framework. This involves the following settings.

5.1       Basic Settings



  • Enable the “Set Usage of GIS Tool” Flag in customizing: Master Data ->Transportation Lane -> Distance and Duration Determination -> Set Usage of GIS Tool



Fig 15: GIS tool usage for DDD




  • The relevant Means of Transport requires an enabled “GIS Quality” flag.



Fig 16: GIS quality flag for MtR




  • The speed profile number range object /SAPAPO/SP requires the creation of an interval as a prerequisite for the buffering of distances and duration.



Fig 17: Speed Profile



5.2       Assign Geo-Coding Strategy to Geo-Coding level.


Customizing: : Master Data -> Transportation Network -> Location -> Geocoding->Define Geocoding Levels


Fig 18: Assign Geo-Coding strategy to Geo-Coding level



5.3       Assign Geo-Coding level to Distance and Duration Determination Strategy


Customizing: Master Data -> Transportation Network -> Transportation Lane -> Distance and Duration Determination->Define Strategy for Distance and Duration Determination and Georouting


Fig 19: Assign Gep-Coding level to DDD Strategy


Note: MTR is optional.

5.4       Assign Geo-Routing for Map


Customizing: : Basic Functions -> Geographical Map -> Define Settings for Geographical Map

To use map Geographical map service, refer to  "SAP Note 3234613-OAuth based authentication in Visual Business".


Fig 20: Enable Map for Geo-Routing


 

6      Testing


Geo-Coding

Test the HSS strategy for Geo-Coding using report /SCMB/TEST_GEO_CODING.

Distance Determination

Test the HSS strategy for Geo-Coding using report /SCMB/TEST_DDD.

Geo-Routing

Optimal testing for Geo-Routing within SAP Transportation Management can be performed in the Transportation Network Cockpit. Choose two locations in countries where Geo-Routing is supported by the designated GIS vendor. Simply drag and drop one location onto the other, and as a result, a real-street route will be displayed.

 

7      Conclusion


By following this step-by-step guide, organizations can seamlessly integrate Transportation Management for SAP S/4HANA with SAP Hana Spatial Service,  leveraging the power of spatial data with matrix routing concept for optimized logistics and transportation management. Embrace this integration to enhance decision-making and efficiency in your supply chain operations.

 

8      Reference


Learn more about How SAP HANA Spatial Services is used within SAP applications

Learn more about MKS 86-GIS Integration for SCE Applications using SAP Cloud Platform

Learn more about 2 Key features of SAP Transportation Management with integration to Cloud Services: SAP HSS service ...

Demo video showing use of HSS within SAP TM application.

Discover further insights into SAP Premium Engagement and explore how an international team of specialists can assist you in maximizing the value of your SAP solutions.

If you already are a Premium Engagement customer, contact your Technical Quality Manager (TQM) to discuss how Premium Engagement Service can help you with a custom-tailored and efficient service portfolio to make your project a success!

 
1 Comment