Prerequisites
-
Your ABAP system needs to meet the following requirements:
-
You need to be a system administrator with permissions for the following:
- Execute task list runs of the Task Manager for Technical Configuration (transaction
STC01
).
- Create users and assign roles to them
- Create customizing requests
- Create system aliases using the SAP Reference IMG
Step 1: Configure SAP Gateway
SAP Gateway allows - amongst other capabilities - to expose SAP Business Suite functionality as REST-based OData services (see official documentation for SAP Gateway Foundation). The SAP Fiori Reference apps are using such OData services and are implemented on the ABAP backend. To be able to expose them and to access them from SAP Cloud Platform, some basic things for SAP Gateway need to be configured on your ABAP system.
The easiest way to do this is to execute the corresponding task lists in the Task Manager for Technical Configuration (transaction STC01
):
-
Call transaction STC01
, enter task list SAP_GATEWAY_BASIC_CONFIG
, and choose Generate Task List Run (F8).

-
On the next screen, choose Start/Resume Task List Run in Dialog (F8).

-
The result should look like this:

-
If you would like to find task list runs again, for example, because it did not finish successfully or you would like to run tasks of your task lists individually, choose Goto
| Run Monitor
on the entry screen of transaction STC01
.

If you get stuck in any step of these task lists you can also do the configuration manually as described in this blog.
Step 2: Set a system alias for SAP Gateway
Step 3: Create a user to access the service
In this step we create a technical user DEMO. The purpose of this user is to restrict the access of the exposed OData services. For example, you can add user DEMO and its password to a destination of your cloud foundry subaccount to get access to the OData services from an app running on SAP Cloud Platform.
-
Call transaction SU01, enter DEMO
in entry field User, and choose Create (F8).

-
Enter DEMO
as Last name on tab Address.
- Change to tab Logon Data, choose User Type
Service
, provide a password, and press RETURN. For the following steps, we assume that you chose Welcome
as a password. Note that you can also choose user type Dialog
or Communication Data
.

- Change to tab
Roles
, call the value help in column Role
, and enter SAP_EPM_REF_APPS_BASIC_AUTH
in entry field Single role. On the next screen, select the role and choose Copy.

- After saving your changes you will be back on main screen for user maintenance again. Keep
DEMO
in entry field User and choose Display (F7).
- Change to tab
Roles
again and double click on the single role you have assigned to this user in step 3 to navigate to the role maintenance (transaction PFCG
).
- Change to tab Authorizations and choose Display Authorization Data.

- Let’s assume that you have already initially filled the Profile Generator customer tables and confirm the following pop-up.

- Generate the authorization profile and choose Back.

- Change to tab User, select the line with User ID
DEMO
in table User Assignments, and choose User comparison.

- In the following pop-up, choose Complete comparison.

- After this you can close the window and the status on tab User should be green.

Step 4: Configure reference apps and generate sample data
Step 5: Check your HTTP Port
To access the OData service you need to know the HTTP port of your system.
- Call transaction
SMICM
, and choose Goto
| Services
(Shift + F1).
- You should see the HTTP port of your system.

Step 6: Test the OData service
After the configuration is done, SAP Gateway provides a whole set of tools to troubleshoot the activated services. The corresponding troubleshooting guide can be found as PDF attachment of SAP Note 1797736.
- For a simple check if the service was activated and can be accessed, enter
/n/IWFND/MAINT_SERVICE
as OK code, hit RETURN
, select Filter, enter *ZEPM*
in entry field Technical Service Name and confirm with Enter.

- Select service
ZEPM_REF_APPS_PROD_MAN_SRV
from the remaining services in column Technical Service Name of the Service Catalog list, and choose SAP Gateway Client.

- Choose Execute to check if you get any response from the service (using HTTP Method GET).

- The result should look like the screenshot below.

- To check if any sample data was successfully generated, choose
EntitySets
, and in the pop-up an entity set from the list, for example, Products.

- After choosing your entity set, choose Execute. You should now get a bigger payload with product data displayed in your HTTP response.
- Next, we would like to check if we can see an HTTP response in the browser and if it can be accessed using the service user we created in step 3. Choose Back, choose service with
Technical Service Name
ZEPM_REF_APPS_PROD_MAN_SRV
from the Service Catalog and choose Call Browser.

- Enter
DEMO
and Welcome
.

-
You should see the same HTTP response as you saw when using the SAP Gateway Client for testing.

If the connection using the browser does not work, it sometimes help to copy the IP address of your ABAP system into the link address.
-
To read an entity set, modify the link in the browser
http://<your server>:<your port>/sap/opu/odata/sap/EPM_REF_APPS_PROD_MAN_SRV/Products
Sometimes Web browsers show the HTTP response of an OData service as RSS feed. When developing OData services you should switch this off to see the actual XML data of the response. In Internet Explorer, choose Tools | Internet Options | Content | Feeds and Web Slices | Settings. Then make sure that Turn on feed reading view is not checked in frame Advanced.

-
Last, but not least, search for product with ID HT-1066
in your payload. Copy the text content of XML element <d:Name>
into the frame below and click on Validate.
Result
You now have exposed OData services of the Fiori Reference apps via HTTP using a service user. For implementation details of these services, check ABAP package S_EPM_REF_APPS_ODATA
.
In the context of connectivity you could now use the Cloud Connector to set up a secure tunnel between your ABAP system and SAP Cloud Platform and consume the OData services of the reference apps in a SAP Cloud Platform app. To do anything with the data coming from your ABAP backend, you still need to develop business logic and user interfaces on SAP Cloud platform.