This repository is created to conduct an SAP Cloud SDK training with the goal to implement a sample Business Partner Address Manager Application based on Spring Boot and the SAP Cloud SDK from SAP.
It contains the structure and definition of one SAP Cloud SDK project with an skeleton application. This application will be enchanced by the participants during the training.
The developed application has the following business scope:
- Display buisness partners in a search list (fetching data from S/4HANA)
- Display single partner detail page (fetching data from S/4HANA)
- Add address information to business partner (add data to S/4HANA)
- Update address information (update data to S/4HANA)
- Delete address information from business partner (delete data to S/4HANA)
Please setup the local development and infrastructure environment beforehand:
- Download and Install Java SDK 8.
- Download and Install the latest Eclipse version.
- Download and Install the latest node.js version.
- Please add the installation folder to the Windows PATH environment variable
Please clone latest master branch from this repository and import it into the Eclipse IDE environment
The sample SAP Cloud SDK project has the following structure
- application The actual source code of the Java Spring Boot application.
- cx-server The SAP Cloud SDK provides a fully configured CI/CD pipeline with predefined Jenkin configuration.
- integration-tests Contains fully integrated end-end JUnit tests starting from simulating REST calls.
- mock-server During the training we will have no real access to an S/4HANA system. Therefore, to test the backend connectivity we will use an OData mock server based on a a simple Node.js application. The server makes it possible to test the SAP S/4HANA integration capabilities of the SAP Cloud SDK without access to an SAP S/4HANA system. The server hosts an OData v2 mock service that mimics the business partner API of SAP S/4HANA Cloud to a limited extent.
- unit-tests Contains all application related to JUnit tests.
- Before the starting the Spring Boot application please install and run the OData mock server locally
- Therefore go to the mock-server folder and run the following commands
npm install
npm start
- The mock-server is accessible on port 3000
- Example: Access Business Partner OData service via http://localhost:3000/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
- Attention: The mock-server is not fully replacing S/4HANA. Limitations are descriped here.
- Therefore go to the mock-server folder and run the following commands
- Run the Spring Boot Application with the following option
- Go to Run Configuration -> Java Application -> Right Click -> New
- Select the application project and the main class is com.capgemini.sandbox.Application
- Go to Environment -> New
- Name: destinations
- Value: [{"name"="ErpQueryEndpoint", "url"="http://localhost:3000"}]
- The UI Frontend can be reached under this link