Connect to OData service on Neo using SAP Cloud SDK
You will learn
In this tutorial, you will enhance the HelloWorld
project stub to call an existing OData
service, deploy the project on SAP Cloud Platform
based on Neo
, and write an integration test.
If you want to follow this tutorial, it is highly recommended to check out the previous tutorials in the series. You will not need any additional software besides the setup explained in the first part of the series as the server will run on your local machine.
Note: This tutorial requires access to an SAP ERP
system or, as a fallback, any other OData V2
service.
Details
Please note that depending on the platform you are using (Neo
or Cloud Foundry
), the configuration to the respective S/4HANA
system might be different. In this tutorial, you will find the methods using which you can access your system on Neo
. For SAP Cloud Platform Neo
, the following S/4HANA
connection capabilities exist.
Prerequisites
- In order to follow this tutorial successfully, you need a working and reachable system of
SAP S/4HANA on-premise
orS/4HANA Cloud
. You may substitute the cost center service introduced here with any other API published on the SAP APIBusinessHub
. If you do not have anS/4HANA
system available, you may use a public service such as the Northwind OData Service as a fallback solution.
SAP Cloud Platform, Neo |
|
---|---|
S/4HANA on-premise | SAP Cloud Connector required with HTTP Destination |
S/4HANA Cloud | Direct Connection with BASIC Auth (technical user); Direct Connection with SAMLOAuthBearer (PrincipalPropagation with BusinessUser ) |
Note that your application code is not dependent on the platform you are using. Using the SAP Cloud SDK
, you can write your code once, and it will be capable of dealing with all different authentication and connectivity options.
-
Step 1: Virtual Data Model
-
Step 2: The manual way to OData
-
Step 3: Virtual Data Model: The new way to OData
-
Step 4: Write the BusinessPartnerServlet
-
Step 5: Deploying the Project
-
Step 6: Integration Test for BusinessPartnerServlet
-
Step 7: test class
-
Step 8: JSON Schema for servlet response validation
-
Step 9: Systems.json and credentials
-
Step 10: Supplying credentials as a file: credentials.yml
-
Step 11: Troubleshooting
-
Step 12: Test yourself
-
Step 13: Test yourself
- Back to Top