Enterprise Event Enablement: Troubleshooting
There are quiet a few blog posts about SAP Cloud Platform Enterprise Messaging and Enterprise Event Enablement. Check out Taranamjit‘s excellent blog post using the SAP S/4HANA Cloud Extensibility service, Pradeep‘s blog post describing the manual Event Enablement configuration on SAP S/4HANA Cloud, or Vijay‘s blog post and Makoto‘s blog post for SAP S/4HANA On-Premise. Just recently Syed has published a new post describing the latest updates for the SAP S/4HANA On-Premise release.
But what to do if you just don’t see any events being recieved in your Event Bus provided by SAP Enterprise Messaging?
In this document I will describe you how to identify and solve the most common configuration issues.
On S/4HANA side there are several components involved to publish the events to the Event Bus: On top of the stack we have the Enterprise Event Enablement (IWXBE) component that builds on top of Business Event Handling (BEH), which itself needs a proper SAP Workflow customization. Luckily all this is automatically configured in a SAP S/4HANA Cloud system. Facing issue with the business events in your SAP S/4HANA On-premise system might be caused by misconfiguration of one of the underlying frameworks. Especially if your SAP S/4HANA On-premise system has been upgraded from one release to the next.
If you have used the SAP S/4HANA Cloud Extensibility service to configure your SAP S/4HANA Cloud system, the overall configuration should be valid. Still the below mentioned points are worth double-checking, no matter if the S/4HANA configuration was done manually or using the SAP S/4HANA Cloud Extensibility service:
Run the Connectivity check!
In SAP S/4HANA Cloud select the Communication Arrangement, where the Channel Name and the Topic Space are maintained. At the bottom of this screen you will find a button Check Connection. This will check if the current channel is active and validate the endpoints and the specified credentials.
Note: If the Communication Arrangement was created by the SAP S/4HANA Cloud Extensibility service you will get a warning that “Changing it can cause issues in the integration setup.” Click okay to continue, as we are not going to change any of the settings.
During activation of a Channel additional artifacts like the ABAP Daemon are created and activated in the background.
The status is the channel is active is displayed in the channels table.
Is the correct event assigned to your channel?
In the screenshot you can see that 3 business objects BusinessPartner, Product and SalesOrder have been assigned to this channel. For BusinessPartner and SalesOrder only Change events will be published, for the Product object all supported events will be published. For the full topic structure please see the next section of this blog.
In SAP S/4HANA On-premise 1909 via transaction SPRO, open the SAP Reference IMG and navigate to SAP Customizing Implementation Guide > SAP NetWeaver > Enterprise Event Enablement > Configuration > Maintain Event Topics to bind events to your channel.
Don’t forget to hit the Save button after adding a new event to the channel. 🙂
Is your Enterprise Messaging queue subscribed to the correct topic?
For the SAP S/4HANA Cloud release the topic structure will be:
<topic-space>/ce/<CloudEvent-topic-structure>, e.g. sap/blog/sample/ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Created/v1
For SAP S/4HANA On-premise 1909 the topic structure is the following:
<topic-space>/<BusinessObject>/<Event>, e.g. sap/blog/sample/BusinessPartner/Created
Note: The Topic Space needs to match the namespace that was defined in the Enterprise Messaging service instance.
Make sure your Enterprise Messaging client is
- allowed to consume the namespace that is being used by the S/4HANA system
- the queue subscribes to the correct topic(s) as it is being published by the S/4HANA system
Note: If you are not sure about the exact topic path you can always subscribe with a wildcard like <topic-space>/*, e.g. sap/blog/sample/*
If you have done the configuration manually you can also check the following:
Are the used credentials correct?
As part of your channel configuration you need to provide the OAuth 2.0 Client Id and Client Secret. Make sure the provided Client Id and Client Secret match the topic space/namespace. If you have more than one Enterprise Messaging service instance it is easy to mix up the credentials.
Is the Topic Space matching the Enterprise Messaging Namespace?
As part of your channel configuration you need to provide the Topic Space. This needs to match the namespace that is part of the Enterprise Messaging service key. Also make sure that the Enterprise Messaging client is allowed to publish to topics in the given Topic Space/namespace.
Especially on SAP S/4HANA On-premise 1909 release, if you had given a wrong (unallowed) Topic Space, it’s best to create a completely new channel with a different name. Background: if the system has already tried to publish events to Enterprise Messaging with a wrong or unallowed Topic Space/namespace, Enterprise Messaging will refuse this and as a result the ABAP Daemon running in the background will be disconnected. Still those events are cached in a table in S/4HANA and after reactivation of the channel will be tried to send to Enterprise Messaging again, putting it into some kind of deadlock situation.
SAP S/4HANA On-premise related activities
For the SAP S/4HANA On-premise release there are some more options to check the configuration:
- Check if support note #2799387 is relevant for your sytsem.
- Did you import the needed SCP certificates into your S/4HANA system (tcode: /nSTRUST)? See steps mentioned in Makoto’s blog.
- You can trigger demo events using transaction tcode /n/IWXBE/EVENT_DEMO. This will verify that configuration of component IWXBE is correct
- Check if there are any errors logged in the IWXBE component: open the SAP Reference IMG and navigate to SAP Customizing Implementation Guide > SAP NetWeaver > Enterprise Event Enablement > Administration > Troubleshooting > Error Log (tcode: /n/IWXBE/ERROR_LOG)
- Check if the automatic workflow configuration has been done in the system (tcode: /nSWU3):
- Check if the Daemon for your channel is up and running: the documented way is via transaction SPRO, open the SAP Reference IMG and navigate to SAP Customizing Implementation Guide > SAP NetWeaver > Enterprise Event Enablement > Monitoring > Monitor Daemon (tcode: /nSMDAEMON).
In the ABAP Daemon Overview you need to click on “Start-Up Configuration”, this will lead to the transaction shown in the screenshot:
- Simulate the Business Events and check the logs:
Start tcode /n/SWUE:
- Switch on the trace for Events
- Select Object Category = BOR Object Typ
- Select Object Type = BUS1006 (this is the Business Partner Object, that must also been assigned to your Channel)
- Select Event = CHANGED (again this Event needs to be assigned to your Channel)
- Select an Object key
- Click on Create Event, this should finish with the following message:
- Display the trace for the Events that have just been created
For each event there should be an entry in the table, ideally marked with a green status. Double-click the entry to display the details:
If everything is working as expected, the log should look similar to the screenshot. Important part is the final line and should state “Receiver started correctly”, if this is the case you should also be able to see the new event on the SCP in Enterprise Messaging.
With the steps described in this document you should be able to solve the most common challenges related to the Enterprise Event Enablement component. But at least it should help you to identify the layer causing the trouble. If you are still not able to get your scenario working end to end, you can open a support incident on the affected component:
- SAP Cloud Platform Enterprise Messaging: BC-CP-CF-MES
- Enterprise Event Enablement (IWXBE): OPU-XBE
- Business Event Handling (BEH): CA-GTF-BEH
Let me know in the comments if there are further recurring situations that are worth mentioning.
I will try to keep this blog post updated, keeping up to date with the latest releases.