Skip to Content

Deploy and Run the Incident Management Application in the SAP BTP, Cloud Foundry Runtime with a Mock Server

Learn how to deploy the Incident Management application in the SAP BTP, Cloud Foundry runtime and test it with the mock server that you've installed.
You will learn
  • How to deploy and the Incident Management application in the SAP BTP, Cloud Foundry runtime.
  • How to test the application with the mock server that you’ve installed.
slavipandeSvetoslav PandelievAugust 27, 2025
Created by
slavipande
June 17, 2024
Contributors
slavipande

Prerequisites

This tutorial follows the guidance provided in the SAP BTP Developer’s Guide.

  • Step 1
    1. In SAP Business Application Studio, navigate to the Incident Management application folder and add the [production] profile credentials (destination and path) to the settings for API_BUSINESS_PARTNER to the package.json file:

      json
      Copy
        "API_BUSINESS_PARTNER": {
          "kind": "odata", 
          "model": "srv/external/API_BUSINESS_PARTNER", 
          "[production]": { 
            "credentials": { 
              "destination": "<destination_name>",
              "path": "odata/v2/api-business-partner"
            }
          }
        }
      

      Replace with the name of the destination that you created at Step 5: Create a destination to the mock server of Install a Mock Server in the SAP BTP, Cloud Foundry Runtime.

    2. In the mta.yaml file, look for the incident-management-srv module’s requires section, and make sure that the line - name: incident-management-destination is added:

      yaml
      Copy
      - name: incident-management-srv
        type: nodejs
        path: gen/srv
        requires:
        - name: incident-management-auth
        - name: incident-management-db
        - name: incident-management-destination
      ....
      
    3. Log in to your subaccount in SAP BTP:

      bash
      Copy
      cf api <API-ENDPOINT>
      cf login
      cf target -o <ORG> -s <SPACE>
      

      You can find the API endpoint in the Overview section of your subaccount in the SAP BTP cockpit.

    4. Run the following commands to build and deploy your project to the SAP BTP, Cloud Foundry runtime:

      bash
      Copy
      mbt build
      cf deploy mta_archives/incident-management_1.0.0.mtar 
      
  • Step 2

    When creating new entries in the Incident Management application, you see all values from the mock server in the value help of the Customer field.

    Before you continue with this step, don’t forget to perform the steps from the tutorials Assign the User Roles and Integrate Your Application with SAP Build Work Zone, Standard Edition.

    1. Open your SAP Build Work Zone, standard edition site as described in Integrate Your Application with SAP Build Work Zone, Standard Edition.

    2. Choose the Incident Management tile.

      Incident Management tile on the launchpage
    3. Choose Create to start creating a new incident.

      Create a new incident
    4. Open the value help for the Customer field.

      Value help for Customer field
    5. Verify that customer data is fetched from the mock server.

      Data in value help

    Congratulations! You have successfully developed, configured, and deployed the Incident Management application using an external service and a mock server.

    Where in the SAP BTP cockpit can you find the API endpoint for logging in to your SAP BTP subaccount?

Back to top