In the following example, I will try to explain how you can connect a Fiori app with multiple backend systems using User Roles with System Aliases in SAP Gateway.
Prerequisites: you have created RFC destinations and System Aliases for backend systems.
Assigning SAP System Alias to OData Service - SAP NetWeaver Gateway - SAP Library
As mentioned in the above link, you can assign multiple SAP system aliases to an oData service and also have specific roles assigned to them using transaction /IWFND/MAINT_SERVICE.
In the below screenshot you can see that I have assigned 4 system aliases with different roles assigned to the service of the "Approve Purchase Orders" Fiori app.
Let me try to give an example:
- First you create a blank role for each backend system in SAP Gateway (transaction PFCG).
Z_ROLE_SYSTEM_1
Z_ROLE_SYSTEM_2
...
etc.
- Then, when you add a system alias to a service, you define also the role for this (transaction /IWFND/MAINT_SERVICE).
Alias | User Role |
---|---|
ALIAS_SYSTEM_1 | Z_ROLE_SYSTEM_1 |
ALIAS_SYSTEM_2 | Z_ROLE_SYSTEM_2 |
ALIAS_SYSTEM_3 |
- Now the behavior of the app depends on the roles assigned to a user:
Scenario | App Behavior |
---|---|
User having none of the above roles | App will have access to system ALIAS_SYSTEM_3 |
User having role Z_ROLE_SYSTEM_1 | App will have access to systems ALIAS_SYSTEM_1 and ALIAS_SYSTEM_3 |
User having roles Z_ROLE_SYSTEM_1 and Z_ROLE_SYSTEM_2 | App will have access to systems ALIAS_SYSTEM_1, ALIAS_SYSTEM_2 and ALIAS_SYSTEM_3 |
*** ATTENTION ***
SAP Gateway caches the metadata of the service. Because you have one service for the system aliases, you may experience unexpected behavior in case you have extended the oData in one system and not in the others. See the problem here: One quite haunted Gateway cache issue
Problem:
In system A you extended the Fiori app oData entity through the available BADIs and added some fields.
In system B you use the standard functionality without any modifications.
In Gateway you have the standard Fiori app and you also extended it to a Z_APP to include the additional fields of system A.
- User A accesses the Z_APP with the additional fields in Launchpad through system alias pointing to system A.
- User B accesses the standard app in Launchpad through system alias pointing to system B.
Gateway behavior: Metadata cache is cleared manually or by the system eg. because you raised SP level of the app or the SAPUI5 libraries SP level.
Scenario 1:
Scenario 2:
Solution:
Caching of metadata based on the system-alias information can be used in the SAP NW Gateway 2.0 SP08 and higher.
http://service.sap.com/sap/support/notes/2000134
Regards,
Vasils
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
15 | |
12 | |
11 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 |