Mentor SAP

Routing Capabilities

You can assign multiple SAP system alias entries to a Gateway service, however, a system alias that is marked as default must always be found when a user calls such a service.

 

As mentioned, the SAP system aliases are selected by using the user role as a filter. If several system alias entries are found based on the role assignments, the alias that is marked as default is chosen.

 

The manager for the EMEA and APJ region is located in EMEA. Therefore, the system alias ERP_EMEA, together with the role manager_APJ_EMEA, is marked as default, whereas the system alias ERP_APJ together with the role manager_APJ_EMEA is not marked as default.

 

 

 

Using a Business Add-In (BAdI) for Gateway Routing

Some customers have requirements for routing that cannot be implemented by just assigning roles. The standard routing based on user role assignments and hostnames of the OData client calling the service can, therefore, be replaced by custom rules. These rules can be implemented by using a BAdI.

 

In our example, customer-specific routing rules are implemented that cannot be implemented via role assignment. In this case, routing is performed by using the class /IWFND/CL_MGW_DEST_FINDER.

 

The solution is to implement an enhancement spot /IWFND/ES_MGW_DEST_FINDER. This is done by inputting the following data:

 

The output is a table of system aliases changed by the BAdI.

 

Routing — User Role: EMEA_EMPLOYEE

If an employee with the role EMEA_EMPLOYEE calls the service, the destination finder will find that this role is assigned to the system alias ERP_EMEA. As a result the user will only see business partners from the EMEA region.

 

 

If an employee with the role US_EMPLOYEE calls the service, the destination finder will find that this role is assigned to the system alias ERP_US. As a result the user will only see business partners from the US region

 

 

If an employee with the role APJ_EMPLOYEE calls the service, the destination finder will find that this role is assigned to the system alias ERP_APJ. As a result the user will only see business partners from the APJ region.

 

 

Calling just the service, the manager gets only the data from the ERP EMEA back-end system, since the system alias of that system, together with the manager role, has been marked as the default.