3

[Blog Post] SAP Event Mesh – S/4HANA On Premise integration with Event Mesh

 1 year ago
source link: https://blogs.sap.com/2023/03/20/blog-post-sap-event-mesh-s-4hana-on-premise-integration-with-event-mesh/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[Blog Post] SAP Event Mesh – S/4HANA On Premise integration with Event Mesh

AuthorsAyush KumarVipul Khullar

Previous blog posts in this series:

Introduction

In the previous few blogs for this series, we saw how to set up the Event Mesh instance in BTP, communicate between different CAP-based microservices using the SAP Event Mesh service to achieve true asynchronous communication and how the CAP framework facilitates the same, and how we can connect the integration suite with Event Mesh.

In this blog, we will touch upon how we can set up S4HANA on-premise system to communicate with Event Mesh on BTP.

Note: We will not be covering how to create business events in the S4 system. Our focus will entirely be on the connection setup.

Prerequisites:

To execute the following scenario, you need.

  • BTP account (trial account would also work).
  • Event Mesh subscription for your subaccount.
  • Service key for the Event Mesh instance.
  • Administrative access for S4HANA on-premise to add certificates in the system.

Scenario:

Scenario%20Overview

Scenario Overview

Steps in S4HANA

  • Access the Enterprise Messaging Token Endpoint (from the service key created) via your browser and download the certificate.
Event%20Mesh%20Service%20Key

Event Mesh Service Key

Login%20Screen%20for%20Event%20Mesh%20Certificate

Login Screen for Event Mesh Certificate

Export%20Certificate

Export Certificate

  • In your SAP S/4 HANA system, open the transaction code STRUST. Double-click the SSL Client (Standard) and add the certificate downloaded in step 1.
STRUST%20Transactions

STRUST Transactions

  • Open the transaction code SPRO.

SAP%20Reference%20IMG

SAP Reference IMG

  • In the SAP Customizing Implementation Guide (IMG), choose ABAP Platform->Enterprise Event Enablement->Administration->Channel Connection Settings->Manage Channel and Parameters and execute the node.
abap-platform.png
  • Select via Service Key and paste the service key created in step 1. Maintain the required fields, such as the Channel, Description, and other details.

Click%20on%20via%20Service%20Key

Click on via Service Key

create-channel-2.png

Create Channel

  • Test the connection and select Activate.
  • Select the Outbound Bindings button at the top.

Create%20Outbound%20Bindings

Create Outbound Bindings

  • On the left pane, click the active channel created in the above step.
  • Click the create a new topic outbound binding icon.
Create%20Outbound%20Bindings%20for%20your%20Channel

Create Outbound Bindings for your Channel

  • Now we will check if we are able to listen to the events in our Event Mesh instance.
Event%20Mesh%20Instance

Event Mesh Instance

  • Now open your Event Mesh instance on BTP and create a queue and queue subscription for the test topic.
Queue%20and%20Subscription

Queue and Subscription

  • Go to the Test tools->Produce Events in you S4 system
  • Click on Execute
TestTools%20ProduceEvents

TestTools ProduceEvents

Produce%20Test%20Events

Produce Test Events

Emit%20Test%20Events

Emit Test Events

  • Now Check if the message is in the queue on which you have subscribed to the incoming event topic.

Message%20Count%20in%20Queue

Message Count in Queue

Check%20Data%20in%20Event%20Mesh

Check Data in Event Mesh

We see that the test event is now visible in the Event Mesh on BTP so your setup is successful and now we can raise our business events in S4 and consume in Event Mesh.

Conclusion

In this blog post, we saw how we can create a communication bridge between S4Hana and Event Mesh on BTP.

In the next blog for this series, we will see how we can raise events from S4Hana and then consume those events in our CAP application.

Please do like the blog post if you find the content helpful. Also, do share your comments and inputs, if any.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK