SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
β€’ Open full site

Deploy and Run the Incident Management Application in the SAP BTP, Cloud Foundry Runtime with SAP S/4HANA Cloud Backend

This tutorial shows you how to prepare your application, deploy it as a Multitarget Application (MTA), and test it with SAP S/4HANA Cloud connectivity.

Overview

🎓 intermediate 45 min. SAP Cloud Application Programming ModelIntermediateNode JsSAP Business Technology Platform

You will learn

  • βœ”How to connect to your SAP S/4HANA Cloud system.
  • βœ”How to extend the existing MTA build file with the settings for the SAP S/4HANA Cloud extension service.
  • βœ”How to test the application with your SAP S/4HANA Cloud system.
Created by June 17, 2024
Contributors

Prerequisites

Prerequisites

OUT OF MAINTENANCE

This tutorial is no longer maintained. For an up-to-date version and support with any issues, refer to the Develop a Side-by-Side CAP-Based Extension Application Following the SAP BTP Developer’s Guide mission in the SAP Discovery Center.

Steps

Step 1 Prepare the Incident Management application
β€”

First, you create a service instance for the SAP S/4HANA Cloud Extensibility service with plan api-access. The SAP S/4HANA Cloud system provides pre-defined communication scenarios that contain one or multiple APIs. When creating the service instance, the communication scenario needs to be specified along with some configuration. Under the hood, a communication arrangement based on the given scenario is created in the SAP S/4HANA Cloud system.

  1. Create a new file bupa.json in the root folder of the project and paste the following code snippet in it:

    JSON
    {
        "systemName": "<SYSTEM_NAME>",
        "communicationArrangement": {
            "communicationArrangementName": "<COMM_NAME>",
            "scenarioId": "SAP_COM_0008",
            "inboundAuthentication": "BasicAuthentication",
            "outboundAuthentication": "BasicAuthentication",
            "outboundServices": [
                {
                    "name": "Replicate Customers from S/4 System to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Replicate Suppliers from S/4 System to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Replicate Company Addresses from S/4 System to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Replicate Workplace Addresses from S/4 System to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Replicate Personal Addresses from S/4 System to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Business Partner - Replicate from SAP S/4HANA Cloud to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Business Partner Relationship - Replicate from SAP S/4HANA Cloud to Client",
                    "isServiceActive": false
                },
                {
                    "name": "Business Partner - Send Confirmation from SAP S/4HANA Cloud to Client",
                    "isServiceActive": false
                },
                {
                    "name": "BP Relationship - Send Confirmation from SAP S/4HANA Cloud to Client",
                    "isServiceActive": false
                }
            ],
            "communicationSystem": {
                "communicationSystemHostname": "default.com",
                "outboundCommunicationUser": {
                    "username": "DefaultUser",
                    "password": "DefaultPassword"
                }
            }
        }
    }
    • For systemName, enter the name of your registered SAP S/4HANA Cloud system. For example, SAP S/4HANA DEV System.
    • For communicationArrangementName, enter a name for the communication arrangement that is created for the SAP S/4HANA Cloud tenant. For example, INCIDENT_MANAGEMENT_0008.

    For more information, see Communication Arrangement JSON/YAML File - Properties.

  2. Navigate to the package.json file in the root folder of the application. Add the [production] profile credentials (destination and path) to the settings for API_BUSINESS_PARTNER:

    JSON
    "API_BUSINESS_PARTNER": {
        "kind": "odata-v2",
        "model": "srv/external/API_BUSINESS_PARTNER",
        "[production]": {
            "credentials": {
                "destination": "incidents-api-access",
                "path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
            }
        }
    }
  3. Open the mta.yml file and add the following code snippet to the resources section:

    YAML
    - name: incidents-api-access
      type: org.cloudfoundry.managed-service  
      parameters:
        path: ./bupa.json
        service: s4-hana-cloud
        service-plan: api-access
        system-name: <system-name>

    For system-name, enter the name of your registered SAP S/4HANA Cloud system. For example, SAP S/4HANA DEV System.

  4. In the mta.yml file, make sure that the line - name: incident-management-destination is added to the requires section of the incident-management-srv module:

    YAML
    - name: incident-management-srv
      type: nodejs
      path: gen/srv
      requires:
      - name: incident-management-auth
      - name: incident-management-db
      - name: incident-management-destination
    ....
Step 2 Deploy the application
+
Step 3 Test the Incident Management application
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Prepare the Incident Management application 2. Deploy the application 3. Test the Incident Management application

Learn more →