If the SAP S/4HANA Cloud system is not available, you can deploy our Business Partner mock server either locally or using the SAP BTP, Kyma environment.
The mock server simply reads all entities in the BusinessPartner-sample.json file and returns it to the calling application.
-
Download the code of this repository btp-kyma-multitenant-extension.
-
Open a command shell and change the directory to code/easyfranchise/source/business-partner-mock-server/.
-
Install the required package in the folder code/easyfranchise/source/business-partner-mock-server/:
npm install
-
Launch the Business Partner mock server:
node server.js
-
Once the mock server is up and running on
http://localhost:8081
(http://127.0.0.1:8081
), try the following get requests:http://localhost:8081/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$expand=to_BusinessPartnerAddress/to_EmailAddress&$format=json
-
These are the needed hiddenconfig.properties, for example, needed in section Start and Test the Database Service, the Business Partner Service and the Easy Franchise Service.
s4hana.destination.URL: http://localhost:8081 s4hana.destination.User: dummy s4hana.destination.Password: dummy s4hana.destination.Authentication: BasicAuthentication s4hana.destination.Type: http
For the next steps you need to have your SAP BTP, Kyma environment ready as described in the section prepare.
The deployment of the service can be done manually as described in the section Deploy the Artifacts Manually or via the deployment script which is described in chapter Deployment via Script.
In case you want to use multiple instances of the mock server to simulate more than one SAP S/4HANA Cloud system, you need to adapt all occurrences of business-partner-mock in the business-partner-mock.yaml, for example to business-partner-mock-2. You should also adapt the business partner data in BusinessPartner-sample.json so that it returns different data than the other instance. Then, you can deploy the second instance as described in the previous section.