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.
Very Useful Tobias Griebe … and thanks for the mention.
One query, Under Maintain Event Topic config, we see only limited Business events. Is there a process to include other Standard business Object events to it? and what if we want to include custom events?
under Maintain Event Topics you will only find events for Business Objects that have been enabled by SAP. This list is growing with each release. For S/4HANA Cloud the list is available on api.sap.com. If you want to request for new Business Events you can do this via this Customer Engagement Initiative.
As Taranamjit has mentioned below, custom events are a roadmap topic. Some intial option will most likely be available with the 2020 S/4HANA On-premise release.
Thanks Tobias Griebe for the mention ; and yes even I faced this issue in Cloud . Suddenly I was not getting any data flowing in my Queues and then I also followed the same what you have suggested and it had worked ..
Vijay : I think what you are looking for would be available with 2020 On Premise version; I had seen the same in SAP Roadmap .
Hi Tobias Griebe
Thanks for the great blog. I just have a question, I tried to test the creation of a event using your Business Partner example above, however there are not receivers defined for the event, like in your example:
Could you possibly share why that would be and how I could correct that?
Hi Jacques Otto,
do you have any Channel that is marked as active and has the BusinessPartner Changed event assigned as outbound event?
You can also have a look at TA /nSWE2 if there is an entry for the Object Type = BUS1006 and Receiver Type = BEH like in the screenshot:
SWE2 - BUS1006 - BEH
Thanks for the reply Tobias Griebe
No, there is no configuration in SWE2 for that Business Object:
Can you share what function module is used in the Event Linkage? Or do you know which one can be used?
Hi Jacques Otto,
ususally once you assign any of the BuPa events to one of your active channels, this should generate the entry in the event linkage table. Strange that BUS1006 doesn't show up at all.
Maybe just try to delete (& save) and re-assign the BuPa event from/to your channel.
If this doesn't help, then it would be best to open a support ticket on: CA-GTF-BEH. The BEH colleagues might then directly check on your system.
Hi Tobias Griebe
Thanks for the reply again, just to be sure when you refer to channel, what exactly do you mean?
Hi Jacques Otto,
I am referring to the eventing channels defined in TA /n/IWXBE/CONFIG.
A channel is the combination of RFC destination, oAuth client and the needed config to send events to the SAP Event Mesh service.
Enterprise Event Enablement: https://help.sap.com/viewer/810dfd34f2cc4f39aa8d946b5204fd9c/2021.000/en-US/c200f98fadb64ff1828ed5696c86fca2.html
Is it possible to achieve event driven architecture without BTP?
Hi Saumya Das,
you question is phrased very generic: for sure it is possible to achieve an event driven architecture without BTP.
I assume your question goes more into the following direction: "Is it possible to send S/4 events to any other event broker than SAP Event Mesh?" To this the answer is: no. Out of the box S/4 can only publish events to SAP Event Mesh.
Thanks Tobias, exactly what I wanted to ask. We wanted to be sure there is no other way out, so we could request for BTP service from client as the requirement is to have them notified whenever an event (for ex: change in Sales order ) occurs in S4.
Hi Tobias- nice blog. We were running into issues with the ABAP daemons not running on our S4 HANA on prem system. They were in always pending state. We spent a few days trying to resolve the issue recreating the channel and oauth client multiple times. Then SAP told us to check if the DDIC user was locked in client 000. This user was locked. Once we unlocked, the daemons were running and we were able to sent out events.
ABAP Daemon Class Name - ABAP Daemon Name
/IWXBE/CL_DAEMON_CONSUME - EVENTMESH
/IWXBE/CL_DAEMON_PUBLISH - EVENTMESH
/IWXBE/CL_DAEMON_SUBSCRIBE - EVENTMESH
Good day! We have been able to successfully post events from S4 to BTP/EM.
What I would like to enable next, is when an event is in the EM queue - being able to consume this into S4 or any other BEH enablement recipient SAP system.
Do you have any more information on this please.
Hi JP Hadjiandreou,
currently S/4 is not supporting any inbound events out-of-the-box. This is planned for the upcoming releases.
What you can do is to expose an REST endpoint via ICF and use the EM webhook functionality to post events from SAP EM to this endpoint.
If you are using the on-prem version of S/4 or any other NW based system, another option would be to use the SAP NetWeaver Add-On for Event Enablement.
Thanks for your reply! Yes, we have both BEH and EE (formerly ASAPIO) integration working outbound from S4 to EM.
Do you have any blogs/documentation on enabling a webhook from EM back to S4 please.
Hi JP Hadjiandreou,
I am not aware of any blogs or guides available on the SAP side.
There is a generic guide available by Asapio: https://asapio.com/docs-inbound/
Hello Tobias Grenzing,
We have done the configuration from S/4HANA (2021) to BTP Event Mesh (Trial Account).
Daemon is also showing green, but message is not reaching in Event Mesh, but shows successful in S/4HANA, any clue? What configuration is missing?
Hi Gaurav Jain,
if you are sure that the events are sent successfully from the S/4 system (in newer S/4 releases like 2021 you could check in the events monitor in TA /n/iwxbe/eee_support), in this case there is most likely something wrong with the topic subscription in your queue.
Double check that you topic subscription matches to the topic that is being used by the S/4 system when sending out the event.
Hello Tobias Grenzing
Thanks for your quick reply. I was looking for this transaction. Now I can see error message here, but unable to find exact error message like. I have created 2 channels, first one pointing to trial account which gives acknowledge but I am unable to see message in the queue.
Second one shows error to CF account but it's not giving reason for error.
Here are screenshot of BTP, Do we need anything else?
Any points will help.
Hi Gaurav Jain
According to the screenshots this seems to work for the channel called "S4EM". You will need to create a "Queue Subscription" and subscribe the matching topics to your queue. Either you just copy & paste the topic from the event log or you even can do it very generic and just subscribe to "*" which will attract any message coming to Event Mesh in your trial environment. Just keep in mind that such a generic topic subscription would not be recommended for a productive use-case.
For the channel called "BTPDEV" there still seems to be some issues. You can have a look at TA /n/IWXBE/ERROR_LOG, if you find more details there. From your description I assume that this is an Event Mesh instance with plan "default". Hence, there might also be something missing in the permissions that you have defined in the rules section when creating the EM instance. The channel is marked as active? The connection check is successful and you can see daemons running for this channel?
Thanks Tobias Bruegging ,
While adding entry in "Queue Subscription" getting error message as "An error occurred while creating queue subscription."
Tried various options as below
* (With various combination)
each time getting the same error message.
Hi Gaurav Jain,
I'm afraid you'll need to open a ticket to get this resolved. I just tried the same and it also didn't work for me. If you check the console of your browser you'll find the error: Received 404 (Not Found) error from underlying service 🙁
The respective component would be: BC-CP-CF-MES
On the step where we add the topic to the Event enablement i do not see the BusinessPartner onces listed.
For example from the above i do not see any. Do you know why that would be.
Hi Himanshu Verma,
do you see any events for the outbound topics?
Are you using S/4 HANA Cloud or S/4 HANA on-prem. For on-prem also the release version is important.
Hi Tobias Griebe,
No, I don't see them on outbound as well . We are using on-prem 2020 SP 3. Do we have any documentation somewhere which tells us which topics would be available for which version.
unfortunately there is no dedicated list for each respective release. But even on S/4HANA on-prem 2020 there had been many events and BusinessPartner was for sure available.
Can you post a screenshot of what you see?
Communication arrangement on BTP: -
Communication Arrangement on BTP
Channels on BTP
I can only see the Business User related events, I know I did some work around that event too where I created a consumption model on ADT and then an event binding. I did the consumption model for the Business Partner one too but still it is not available.
Thanks for your help.
Hi Himanshu Verma,
I would suggest to open a ticket for a proper analyze within your landscape/system.
The respective component would be: OPU-XBE
Hi Tobias Griebe ,
how would one best consume business events locally in a S/4HANA onpremise system, ie using the standard business events but reacting locally in the same system the events is created and without routing the event through the event mesh?
Hi Wolfgang Röckelein,
I'm am not the ABAP expert and this would better be answered by someone with a strong S/4 background. 😉
The business events exposed to Event Mesh are intended for external consumers to react to events coming from your S/4HANA system.
If you want to react internally, this should be achieved by the well established mechanisms like change pointers, BOR events, etc.
Hi Tobias Griebe ,
I was hoping for some uniform modern way ...
Also some of the mentioned "established" mechanisms might not be avaible eg in embedded steampunk, when you like to use a "modern" mechanism.
I have a requirement to stop the automated job posting sales order creation and change event from SAP ECC to Event Mesh. But the event pushed manually from ECC should reach Event Mesh. I have the whole set up configured in ECC and BTP and currently both manually posted events and the events pushed by the automated job are reaching Event Mesh. Please let me know how this can be achieved in SAP ECC system.
we are having issues with the ObjectID transfer between the Event enablement Addon and the event mesh. We are raising events for for one object with different IDs at the same time. In the SWEL we can see that the events are raised and with the correct IDs. Unfortunatelly, when consuming the Event Mesh queue in the Integeration Suite, we noticed that some of the objectIDs are repeating and some are missing. Any idea what could be the issue and what else we can check?