Connecting to SAP S/4HANA

Objective

After completing this lesson, you will be able to connect SAP Sustainability Control Tower to SAP S/4HANA.

Data Replication

Connecting your SAP BTP subaccount to SAP S/4HANA for data replication for on-premise systems can be broken down into four key steps:

The graphic summarizes the steps to connect SAP BTP subaccount to SAP S/4HANA.

Let's take a closer look at each step.

Step 1: Authorizations for Data Replication

To retrieve business data from SAP S/4HANA through Cloud Data Integration (CDI), you need a technical user. This user requires a role with authorizations. To know more about the authorization objects and their configurations see Authorizations for Data Replication.

Step 2: Enabling the Cloud Connector

Install and configure the cloud connector to enable a secure communication tunnel between SAP S/4HANA and SAP BTP.

The cloud connector enables access to SAP S/4HANA. It must be installed in your on-premise intranet network. For more information, see Cloud Connector.

The prerequisites for enabling the Cloud Connector are:

  • You have an administration user for your cloud connector installation. See Cloud Connector: Initial Configuration for more information.
  • You have the role Security Administrator for your SAP BTP subaccount.
Configuring the Cloud Connector

Once the cloud connector has been installed, configure it, and connect it to your SAP BTP subaccount. Follow the steps here:

  1. Navigate to the Cloud Connector Subaccount Administration.
  2. On the Connector overview page, select Add Subaccount to add your SAP BTP subaccount.
  3. In the popup, directly start adding your SAP BTP subaccount details and select Save.

    Add Subaccount

    FieldValue
    Region*The region of your subaccount, for example, Europe (Frankfurt).
    Subaccount*The ID (GUID) of your subaccount.
    Display NameAny name that identifies your SAP BTP subaccount.
    Subaccount User*A user to access the SAP BTP cockpit. It needs the role User and Role Administrator assigned to it.
    Password*The password of the SAP BTP cockpit user.
    Location ID

    Empty.

    If a value is specified, the same value needs to be specified in the definition of the destination in the SAP BTP cockpit.

    DescriptionOptional.
  4. You can find the required information to enter in the above cloud connector popup on this overview page. You can identify the region, the provider, and the subaccount ID in the tab General.
  5. You have now connected your SAP BTP subaccount and can see it in the subaccount dashboard. The status is still yellow, as backend access has not been configured yet.
  6. Configure access control: specify the backend systems that can be accessed by your cloud applications. Select the newly created subaccount and select Cloud To On-Premise in the menu on the left side of the screen.
  7. Select the + button on the Access Control tab and define a new mapping from virtual to internal system.

    Add System Mapping

    FieldValue
    Backend TypeABAP system.
    ProtocolHTTPS.
    Virtual Host

    A name of your choice.

    You can choose any virtual host name here, but you need to reuse the values defined here when creating a destination service later.

    Virtual Port

    The port number that will be used in the SAP BTP destination to address the SAP S/4HANA system.

    You can choose any virtual port here, but you need to reuse the values defined here when creating a destination service later.

    Internal Host*The host of your SAP S/4HANA system.
    Internal Port*The HTTPS port of your SAP S/4HANA system.
    Principal TypeNone.
    Host in Request HeaderUse internal host.
    DescriptionOptional.
  8. For more information, see Configure Access Control (HTTP) | SAP Help Portal.
  9. You now see a new entry in the mappings table. The icon in the Check Result column should be green, but the status is still grey, as no accessible resources have been defined yet.
  10. Add resources: Specify which URL paths (resources) are allowed to be called on the host that you just specified.
    1. To define the permitted URLs for a particular backend system, choose Add in the section Resources Of.
    2. Enter the URL path /sap/opu/odata.
    3. Select Active.
    4. d. Select the option Path and All Sub-Paths. With this setting, the cloud connector allows all requests for which the URL path starts with the specified string.
  11. Check your configuration by selecting Check Availability in the column Actions.

After a successful configuration of the cloud connector, you will find a corresponding entry in the SAP BTP cockpit under SubaccountConnectivityCloud Connectors.

Step 3: Setting up the Destination

Establish the communication arrangement between SAP S/4HANA and the SAP BTP  by adding new destinations to the SAP BTP subaccount to enable communication between SAP Sustainability Control Tower and the SAP S/4HANA.

Watch the demo to see how to set up a destination.

Step 4: Activating OData Services for Integration

Follow these steps to activate the OData V4 service:

  1. For the OData V4 service, use the Activate and Maintain Services transaction /n/IWFND/V4_ADMIN. For more information, see Service Group Publishing | SAP Help Portal.

    The following OData V4 service groups need to be activated:

    • CDI_CDS
    • CDI
  2. Log in to the backend of the system using SAP GUI (for Mac users) or SAP Logon (for Windows users).
  3. Run the transaction /n/IWFND/V4_ADMIN. This will redirect you to SAP Gateway Service Administration.
  4. Select Publish Service Groups in the upper right corner.A screenshot showing where to find Publish Service Groups in SAP Gateway Service Administration.

    The SAP Gateway Service Publishing window will open.

  5. Add the System Alias and Service Group ID.
    1. The System Alias is usually the name of the backend system. Use value help to find the correct system alias.
    2. The Service Group ID is the service group of the OData API that you want to publish. In this case, enter the value CDI* and select Get Service Groups.
  6. Select the service groups CDI_CDS and CDI, then choose Publish Service Groups.
  7. Upon completion, a confirmation window will open. Confirm and publish the service group. You can now consume the API.