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
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-1.png?resize=730%2C497&ssl=1)
Creation of a topic subscription
Next, create a topic subscription.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-2.png?resize=730%2C351&ssl=1)
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.
Creation of a service key for EM messaging client
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-3.png?resize=730%2C688&ssl=1)
The service key is needed to get the credentials for S4 to connect to EMIS.
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’
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-4.png?resize=730%2C515&ssl=1)
Provide a destination name and choose connection type as ‘HTTP connection to external server’
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-5.png?resize=730%2C539&ssl=1)
Save.
Now, refer to the service key created using SAP Integration Suite, Event Mesh – ‘message client’ instance.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-6.png?resize=730%2C395&ssl=1)
You need to refer to this service key to provide the details in the sm59 destination.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-7.png?resize=730%2C466&ssl=1)
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 –
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-8.png?resize=730%2C465&ssl=1)
Save.
Creation of Oauth client for S4
S4HANA authenticates with EMIS using Oauth2.0.
You need to execute the below transaction:
/nOA2C_CONFIG
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-9.png?resize=730%2C289&ssl=1)
Choose ‘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.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-10.png?resize=730%2C394&ssl=1)
The Access Settings are mentioned below:
Client Authentication: Form Fields
Resource Access Authentication: Header Field
Selected Grant Type: Client Credentials
Creation of a channel using form fields on S/4
Kindly execute the below transaction to configure the channel:
/n/IWXBE/CONFIG
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-11.png?resize=354%2C580&ssl=1)
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.
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 –
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-12.png?resize=730%2C431&ssl=1)
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
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-13.png?resize=730%2C269&ssl=1)
Click 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.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-14.png?resize=730%2C408&ssl=1)
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)
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-s-4hana-direct-connectivity-with-event-mesh-in-integration-suite-15.png?resize=730%2C138&ssl=1)
Congratulations – You have succeeded in integrating SAP S/4HANA with Event Mesh in Integration Suite!