Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 2.99 KB

File metadata and controls

50 lines (32 loc) · 2.99 KB

How to Use the Business Partner Mock Server

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.

Business Partner Data

The mock server simply reads all entities in the BusinessPartner-sample.json file and returns it to the calling application.

Start the Business Partner Mock Server Locally

  1. Download the code of this repository btp-kyma-multitenant-extension.

  2. Open a command shell and change the directory to code/easyfranchise/source/business-partner-mock-server/.

  3. Install the required package in the folder code/easyfranchise/source/business-partner-mock-server/:

    npm install
  4. Launch the Business Partner mock server:

    node server.js
  5. 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
  6. 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

Deploy to the Kyma Cluster

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.

Using Multiple Instances

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.