S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

SAP S/4HANA Cloud provides predefined SAP services (for example various services from the Cloud Marketing Edition and services from the Enterprise Edition such as Project Maintenance). As of 1608 you can also define custom services that you can use on HCP.

Before you go into the details, you should consider:
1. You need a valid HCP account. You can connect multiple HCP account to an SAP S/4HANA Cloud system and vice versa. In other words, HCP account and SAP S/4HANA Cloud system can be connected with a cardinality of n:m.
2. You need no cloud connector for the connection from SAP S/4HANA Cloud system to HCP.
3. For an S/4HANA Cloud (on premise) system or SAP Business Suite system .

The remainder of this article consists of three parts (plus prerequisites):
1. The setup of the connection between your SAP S/4HANA Cloud account and your HCP account (one-time activity per SAP S/4HANA Cloud account and HCP account)
2. The configuration of a new service that shall be used in your HCP account (activity per service)
3. One example how to consume the exposed service on HCP (with SAP Web IDE).

0. Prerequistes
1. SAP S/4HANA Cloud: In the Maintain Business User Fiori app, assign a business role with the business catalog Communication Management and Extensibility to the user that is going to do the setup. As a result, the user will see the following Fiori apps

  1. Maintain Communication Users
  2. Communication Systems
  3. Communication Arrangements
  4. Custom Communication Scenarios

2. HCP: You have administration access the HCP account

1. Setup of the SAP S/4HANA Cloud – HCP Connection
The setup consists of two parts

  • SAP S/4HANA Cloud: creation of the communication system and user
  • HCP: creation of the destination

To create the communication system and communication user in SAP S/4HANA Cloud:
1. Open the Fiori app Communication Systems, create a new communication system (you can name it for example HCP).
2. In section User for Inbound Communication, create a new communication user (you can name it for example HCP). Enter a password or let the system create one. You can also use a certificate.
3. All remaining fields, such as Contact person, E-Mail, Phone, etc. are optional.
4. Save the new communication system, and check that the status says Active.

To create of the destination in HCP:
1. Open your HCP account, go to Connectivity, Destinations
2. Create a new destination with the following attributes:

  • Name: choose a name for example “S4HANA”
  • Type: HTTP (this includes HTTPS, which is used)
  • Description: choose a description for example “S4HANA”
  • URL: enter the URL of you S/4HANA account, for example “https://myserver.s4hana.ondemand.com”
  • Proxy Type: Internet
  • Authentication: BasicAuthentication
  • User & Password: enter the user / pwd you created before, for example “HCP”
  • Check “Use default JDK truststore” for security settings
  • Only if you want to use Web IDE (see section 3, below), set the Additional Properties:
    • WebIDEEnabled: true
    • WebIDESystem: name of the system, e.g. “S4HANA”
    • WebIDEUsage: odata_gen

S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

Screenshot: HCP Cockpit: Destination Configuration

Result: Your SAP S/4HANA Cloud account and your HCP account are now connected.

2. Expose a SAP S/4HANA Cloud Service So That It Can Be Used in HCP
Before we describe how to configure a SAP S/4HANA Cloud service for HCP, I would like to give an overview which services can be configured for HCP:

  • Predefined SAP services: for example various services from the Cloud Marketing Edition and services from the Enterprise Edition such as Project Maintenance.
  • Custom services: as of version 1608 you can expose Custom Business Objects as service on HCP. In future versions, it should be possible to expose Custom CDS Views and Custom Analytical Queries as external services.

To find the predefined SAP services, you can check the SAP API Business Hub https://api.sap.com/, select SAP S/4HANA Marketing Cloud or SAP S/4HANA Cloud. (Note: As far as I can see, not all available services are registered there yet. You can see all services in the system in the Communication Arrangement app, see below.)

S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

Screenshot: SAP API Business Hub showing the details of a S/4HANA cloud service

To expose a predefined SAP S/4HANA Cloud service to be used in HCP:
1. Open the Fiori app Communication Arrangement, create a new communication arrangement.
2. Select an SAP communication scenario from the list. A communication scenario represents one or more predefined SAP services. For example, you could select “SAP_COM_0004: Marketing – Business Data Integration”. As mentioned, in the list you may find more services than already documented in the SAP API Hub.
3. Select the communication system that you created in the setup step, for example “HCP”.
4. Save the new communication system, and check that the status says Active.

As an example, see the following screenshot.

S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

Screenshot: Communication Arrangment Fiori app

Result: The selected services are now available in HCP under destination you created before (for example “S4HANA”). In the communication scenario screen, you can find the service URL that you can use in HCP to access the service.

To configure a custom service to be used in HCP:
1. Open the Fiori app Custom Communication Scenarios, create a new Communication Scenario.
2. Enter a name and description, for example the name of the custom service.
3. Click the “Add” button. In the selection list, all custom business objects are shown. Select a custom business object that you want to expose as external service. In the future, also custom CDS views and custom analytical queries will be available here.

1. Save and publish the new communication scenario, and check that the status says Published.
2. Continue with the procedure as described for predefined SAP S/4HANA Cloud service.

Result: The selected service is now available in HCP under the destination you created before (for example “S4HANA”).

What happens “under the hood”? By creating a communication scenario, you assign an authorization role to the communication user of the related communication system. For a SAP-defined communication scenario, the role already exists in the system. For a custom service, the authorization role is created when publishing the custom communication scenario.

3. Use the Service in HCP
You can use a service in HCP in many different way. You can use it to build a new UI, you can call it in your Java or JavaScript coding, you can use it in HANA Cloud Integration iFlows. Here I want to show only one simple use case on how to consume it: SAP Web IDE.

  • Start SAP Web IDE. (From you HCP account dashboard, select Services, search for SAP Web IDE, click Open SAP Web IDE.)
  • Select: File, New, New Project from Template.
  • Select for example SAP Fiori Master Detail Application.
  • Enter a name for a project
  • On the step Data Connection, select Service URL. Select the destination you created before and the relative path of the OData service, as given in the Communication Arrangement screen. You can now discover the details of the service and you can even discover the live data (see the screenshot below)
  • Continue with the creation wizard to create a Fiori app out of the OData service.

S/4HANA Extensibility: How to Connect Your SAP S4HANA Cloud to SAP HANA Cloud Platform (HCP)

Screenshot: Consuming the exposed service in SAP Web IDE

Result: The exposed service is used in a Fiori app running on HCP.

Leave a Reply

Your email address will not be published. Required fields are marked *