To be able to access data in SAP BTP application from SAP S/4HANA system, you will activate the OData endpoint in your system. Next you will create yourself a user in SAP S/4HANA and assign the needed authorization to allow the usage of your created OData endpoint.
First, we need to activate the OData endpoint in SAP S/4HANA on-premise system, so it is accessible from SAP BTP application.
-
Open your SAP S/4HANA on-premise system.
-
Navigate to transaction code: /N/IWFND/MAINT_SERVICE.
-
Choose Add Service in the Service Catalog.
-
Enter System Alias 'LOCAL', External Service Name 'API_BUSINESS_PARTNER' and hit Enter to search for all matching services.
-
Choose the checkbox to select service and choose Add Selected Services.
-
On the next screen, specify Package Assignment, for example, $TMP by choosing Local Object.
-
Check checkbox for Enable OAuth for Service and choose Continue.
Now, we are going to create a user in our SAP S/4HANA backend system and assign the required authorizations.
-
Go back to your initial screen and navigate to transaction code: /NSU01
-
Enter your Technical User in the field User.
-
Choose Create.
-
Switch to the Address Tab and add the corresponding last name to the lastname field.
-
In tab Logon Data change User Type to Dialog.
-
Create a new Password for your User and repeat it to verify. Choose Save.
-
Navigate to transaction code: /nPFCG
-
Enter RiskTech in the Role field, then choose Single Role.
-
On the next screen enter a description first, then switch to the Menu tab and choose Save in the pop-up window.
-
Choose Transaction on the menu tab to enter a new Transaction.
-
Enter the transaction code for which you need to provide access in the pop-up window. In our case enter BP.
-
Choose Assign Transactions to finish.
-
Select Authorization Default from the Transaction dropdown in the menu tab.
-
In the pop-up window, select SAP Gateway: Service Groups Metadata as Authorization Default from the dropdown menu
-
Enter the name of active Business Partner API - you can look this up using the menu - into to the table and choose Copy.
-
Switch to the Authorizations tab and choose Change Authorization Data.
-
Don´t forget to Save the role first.
-
Navigate to Edit → Insert Authorizations → From template.
-
Search for /IWFND/RT_GW_USER in the pop-up window and select the checkmark to apply the template.
-
Now choose Status, then generate with clicking the circle icon on the top and Save the profile in the pop-up.
-
Go back and switch to the User tab and select your technical user in the table. Save the profile, choose User Comparison, and choose full comparisons in the pop-up.
-
Log off from the admin user system by entering the transaction /nEX.
-
Log on to the GUI using your newly created Technical User.
You have activated your Business Partner OData service and created a technical user in our SAP S/4HANA on-premise backend system.
In the next section, you will use the Cloud Connector to create the connection between SAP S/4HANA system and your SAP BTP account.