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
Creation of a topic subscription
Next, create a topic subscription.
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
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’
Provide a destination name and choose connection type as ‘HTTP connection to external server’
Save.
Now, refer to the service key created using SAP Integration Suite, Event Mesh – ‘message client’ instance.
You need to refer to this service key to provide the details in the sm59 destination.
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 –
Save.
Creation of Oauth client for S4
S4HANA authenticates with EMIS using Oauth2.0.
You need to execute the below transaction:
/nOA2C_CONFIG
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.
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
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 –
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
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.
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)
Congratulations – You have succeeded in integrating SAP S/4HANA with Event Mesh in Integration Suite!