Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
prashantrakheja33
Product and Topic Expert
Product and Topic Expert
15,976

With the latest release of Event Mesh as a capability of SAP Integration Suite, it is possible to configure SAP S/4HANA to directly send events to EMIS (Event Mesh in Integration Suite).  

This post covers the details of how you can configure this integration. 

Prerequisites:  

You have SAP Integration Suite, and you have activated Event Mesh as a capability. 

Creation of a Queue on EMIS 

prashantrakheja_0-1720169004567.png

For more details on Queue creation, kindly refer to this doc  

Creation of a topic subscription  

Next, create a topic subscription.  

prashantrakheja_1-1720169004568.png

For S4 integration, it is important to note that the topic name should correspond to the topic space defined in S4. Kindly note the asterisk (*) in the topic name which acts as a wildcard for the topic hierarchy.  
 
For more details, kindly refer to this doc  

Creation of a service key for EM messaging client 

prashantrakheja_2-1720169004569.png

The service key is needed to get the credentials for S4 to connect to EMIS. For more details, kindly refer to this doc.  
 
Kindly create the service key post successful creation of service instance.  

Creation of SM59 destination on S/4  

S/4HANA needs details such as hostname and port to connect to EMIS. These details are specified in the sm59 destination.   

Kindly execute the following transaction: 
 
/nsm59  

Choose ‘Create’  

prashantrakheja_3-1720169004569.png

Provide a destination name and choose connection type as ‘HTTP connection to external server’ 

prashantrakheja_4-1720169004570.pngSave. 
 
Now, refer to the service key created using SAP Integration Suite, Event Mesh – ‘message client’ instance.  

prashantrakheja_5-1720169004571.pngYou need to refer to this service key to provide the details in the sm59 destination. 

prashantrakheja_6-1720169004572.png
The hostname can be obtained from the ‘uri’ section under ‘messaging’ 
 
The port should be ‘443’ and path prefix ‘/protocols/amqp10ws’ for AMQP. (the first release of EMIS only supports AMQP protocol for messaging)  

In the logon and security tab, set ‘SSL’ to ‘Active’ as shown below -  

prashantrakheja_7-1720169004574.pngSave.   

Creation of Oauth client for S4  

S4HANA authenticates with EMIS using Oauth2.0.  

You need to execute the below transaction:  

/nOA2C_CONFIG  

prashantrakheja_8-1720169004574.pngChoose ‘Create’ and provide the necessary details. 
 
The OAuth2.0 Client Profile as shown above needs to be ‘IWXBE/MGW_MQTT’ even for AMQP based messaging.  

You can provide any configuration name, the Oauth 2.0 client ID can be found from the service key created above under the ‘oa2’ section in ‘messaging’.   

Choose OK. 
 
Provide the client secret, authorization and token endpoint from the service key.   

The authorization endpoint is not directly provided in the service key, but it is same as the token endpoint, except that it ends with ‘/authorize’ as show below.  

prashantrakheja_9-1720169004576.pngThe Access Settings are mentioned below: 
 
Client Authentication: Form Fields  

Resource Access Authentication: Header Field  

Selected Grant Type: Client Credentials 
 
For complete details on configuring the Oauth client, kindly refer to this doc.  

Creation of a channel using form fields on S/4  

Kindly execute the below transaction to configure the channel: 
 
/n/IWXBE/CONFIG  

prashantrakheja_10-1720169004576.png 
Create a new channel (without service key).  

At this point, it is not possible to configure this using the ‘Create Channel via Service Key’ option.   

This is currently a gap and will be addressed in an upcoming release. Please refer to SAP Note 3461547 for any updates.  

It is important to note that the above gap is only applicable for Event Mesh in Integration Suite (EMIS).
For Event Mesh (default), the recommended way is to use 'Create Channel via Service Key' option on S4.

Choose ‘Default’ or ‘SAP Event Mesh’.  

Now the following details need to be provided –  

prashantrakheja_11-1720169004577.png
You can provide any name to the channel.  

The destination needs to be the name of the sm59 destination as created above.  

The topic space needs to correspond to the topic subscription on the Queue.  

The Oauth 2.0 Configuration needs to be the name of the Oauth2.0 client configuration as created above.  

Save.   

Activation of Channel & Connectivity Check  

prashantrakheja_12-1720169004578.pngClick on ‘Activate’ followed by ‘Check Connection’ to ensure that connection to Event Mesh is successful.  

Sending a Test Event using Event monitor  

Kindly execute this transaction,  

/n/IWXBE/EEE_SUPPORT  

Choose ‘Produce Test Events’ followed by the channel.  

prashantrakheja_13-1720169004578.png

Execute the transaction.  

You can now navigate back to Event Mesh in Integration Suite, head over to the Queues section and find the message queued! (unless there is active consumer)  

prashantrakheja_14-1720169004579.png 

Congratulations – You have succeeded in integrating SAP S/4HANA with Event Mesh in Integration Suite! 

21 Comments
Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Great step-by-step overview Prashant!

It might be worthwhile to add that for SSL to work you would need to add the certificate of the "a.eventmesh.integration.cloud.sap" domain to STRUST as well.

Looking forward to further features in this new capability!

osalas
Discoverer
0 Kudos

I have trouble with my SSL and OAuth authentication. I followed every step as indicated and yet I Only get errors like:

Error Text HTTP failure, processing failed, invalid state, invalid timeout or others

Include CL_OA2C_CLIENT_PROTOCOL_UTILS=CM004

Error Component BC-SEC-LGN-OA2

I already attahced certificate from uri. It is strange that uri starts with wss:// 

 

It is my first time doing this on a S$ HANA Cloud private edition 2023-

pento
Explorer
0 Kudos

@Willem_Pardaens how can we find the the certificate of "a.eventmesh.integration.cloud.sap" domain to add it to STRUST i am having this problem to connect event mesh

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert

Hi @pento and @osalas ,

To add the correct certificate to your STRUST:

1. Get the messaging uri from the service key (screenshot in the blog here). This will look like: "wss://<your-account>.eu10.a.eventmesh.integration.cloud.sap/protocols/amqp10ws". Replace the "wss://" part with "https://" and open this url in your browser. You will get "Authorization Header Required" but the browser will now contain your certificate.

2. Download/export this certificate and add it to STRUST under the "SSL Client (standard)". You can find a screenshot of this step here: https://community.sap.com/t5/technology-blogs-by-sap/blog-post-sap-event-mesh-s-4hana-on-premise-int...

pamolibanerjee
Discoverer
0 Kudos

Quick question @prashantrakheja33 @Willem_Pardaens : Would it be possible to send data events from S/4HANA on system to EMIS instance using this data events blog

prashantrakheja33
Product and Topic Expert
Product and Topic Expert
0 Kudos

@pamolibanerjee Currently, EMIS does not support REST for messaging. In this blog, we have mentioned SAP Note 3461547 where this limitation is highlighted.

However, going forward, support for REST protocol would be available and then you should be able to use the add-on mentioned in the data events blog.

Regards,
Prashant 

AD34
Discoverer
0 Kudos


I get this error even I followed all the steps

AD34_0-1723699329892.png
What is wrong here? 

AD34_1-1723699372059.png

 

 

Sonalika
Explorer
0 Kudos

Hi,

 

I did all the steps..but in SPRO->EnterpriseEventEnablement->Manage Channel and parameter

while activating getting 500 error.

Can you suggest plz?

 
 
 

Capture.PNG

saurabhkumbhare
Active Participant
0 Kudos

@Sonalika, Please ensure you are using the correct url from the service key.

 

Thanks 

Saurabh 

Sonalika
Explorer
0 Kudos

Hi,

 

While checking the channel configuration connectivity getting below error now.any idea?

Capture.PNG

saurabhkumbhare
Active Participant
0 Kudos

Looks like authorization problem to me. The auth team can check 

Sonalika
Explorer
0 Kudos

Its working now.Auth issue.Thanks

as_sc
Discoverer
0 Kudos

Hallo zusammen!

Ich erhalte beim Versuch, die Testdaten über TCode /IWXBE/EEE_SUPPORT zu verschicken folgenden Fehler:

alexschulze_1-1726736559128.png

alexschulze_2-1726736578077.png

Leider finde ich zu der Fehlermeldung rein gar nichts - irgend eine Idee was hier das Problem sein könnte?

Zudem stehen in Transaktion /IWXBE/ERROR_LOG folgende Einträge:

alexschulze_0-1726736409598.png

Über jede Hilfe dankbar.

Alex

Sonalika
Explorer
0 Kudos

Hi @as_sc ,

 

Have u configured the Queue in Topic subscription correctly in CPI?

 

florianwunderle
Explorer
0 Kudos

Hi @prashantrakheja33,

thanks for the nice and descriptive blog. I have one slight comment to it: Maybe it would be worth mentioning that this works from S/4HANA 2021(?) onwards. I was trying in a 2020 environment and it took me far too long to realize that this version still uses the protocol MQTT_311_WS instead of AMQP. 

//Florian

pento
Explorer
0 Kudos

Hello,
I think there is a problem as something has changed in this capablity and now we have this when testing sm59 destination

pento_0-1730384458918.png


and the channel doesn't work anymore. do you have a solution ?

maadireddy
Discoverer
0 Kudos

@Sonalika I'm getting the same 500 error, after maintaining all the settings as described. How did you solve this error? Any pointers are highly appreciated. 

ShivaPalapudi
Discoverer
0 Kudos

Hello Prashant,

   I have done the same steps as you but the channel activation failed in S4HANA 2020 with error @5C\QError@ WebSocket connection set up has failed with error text: 400 Bad Request {} (error type: 1)

  Is the new EMIS , supports only from S4HANA 2021 ?

 

davisingh
Explorer
0 Kudos

Hi @prashantrakheja33 

Thanks for writing this blog, but we are confused new instance in BTP should be created with environment as "Cloud Foundary" or "Other Enviornment". SAP help documentation doesn't say either.

https://help.sap.com/docs/integration-suite/sap-integration-suite/configure-message-client 

With CF we don't get Create Service Binding whereas with Other Environment we do get.

Secondly when viewing credential for binding in case of "Other Environment", we get following message - is this something we should be worried off?

davisingh_0-1737123681930.png

Regards

 

Deepthi73
Discoverer
0 Kudos

@maadireddy,@Sonalika  Could you please help us on how did you resolve 500 error during activation of channel. We are facing similar issue

Deepthi73
Discoverer
0 Kudos

We have resolved this issue. In SMICM we found that it is looking for Issuer/Root certificate ISRG-X1 and R10 which was downloaded from amqp host url https://<your-account>.eu10.a.eventmesh.integration.cloud.sap and added it in SSL Standard along with Anonymous.