Skip to Content
0
Jan 12, 2023 at 08:44 PM

Events from S/4HANA cloud not received by Event Mesh

368 Views Last edit Jan 13, 2023 at 09:28 PM 5 rev

I am attempting to configure a new S/4HANA Cloud and Business Technology Platform for side-by-side extension development using Extending SAP Solutions Using Automated Configurations | SAP Help Portal as a guide.

I'm using this GitHub project to test my configuration. SAP-samples/cloud-extension-s4hana-cloud-business-process: This sample showcases how to complement an existing business process in SAP S/4HANA Cloud with additional business process steps. This involves adding major logic and/or additional data. (github.com)

The process seems to have gone OK, but when I test it, no events arrive at the application.

I found a troubleshooting guide here: Enterprise Event Enablement: Troubleshooting | SAP Blogs which I used to guide this post.

Apologies for all the screenshots, I hope someone will see a problem in one of them. There are questions in BOLD.

The first step in the troubleshooting guide is a connectivity check in S/4HANA, which is successful:

communication-check.png

A wildcard Business Partner events (sap/s4/beh/businesspartner/v1/BusinessPartner/*) was added to the outbound topics in a channel named SAP_CP_XF_UDC1. These are bound to the udc1 Event Mesh client.

channel-configuration.png

In the udc1 client in Event Mesh, I can see two events defined. I'm not sure exactly how these events got here, but the look OK to me. Question: Does it matter that only a subset of outbound topics defined in the S/4HANA channel events are listed here?

ucd1-event-client.png

In the troubleshooting guide, it says "Note: The Topic Space needs to match the namespace that was defined in the Enterprise Messaging service instance."

In my system, the namespace is sap\HANAOD\udc1

image.png

In S/4HANA Cloud, I found Topic space in the Communication Arrangement (Not in the Channel). Question: Am I right that the topic space is in Communication Arrangement, not the Channel? If so, my configuration looks right: sap/S4HANAOD/udc1

topic-space.png

Next, I check to make sure the second EM client (ems-sap-gis) is able to subscribe to topics in the S/4HANA client (udc1). Here is the JSON from the ems-sap-gis client:

{
  "options": {
    "management": true,
    "messagingrest": true,
    "messaging": true
  },
  "namespace": "udc/sapgis/ems-s4hc",
  "rules": {
    "topicRules": {
      "publishFilter": [
        "${namespace}/*"
      ],
      "subscribeFilter": [
        "${namespace}/*",
        "sap/S4HANAOD/udc1/*"
      ]
    },
    "queueRules": {
      "publishFilter": [
        "${namespace}/*"
      ],
      "subscribeFilter": [
        "${namespace}/*"
      ]
    }
  },
  "version": "1.1.0",
  "emname": "ems-sap-gis"
}<br>

I created a queue and added topics for the two events defined in the S/4HANA client (udc1). I also pushed the geo app, which also created a queue that subscribes to the same topics.

queue-topic-subscription.png

To test, I went back to S/4HANA and changed a Business Partner. I checked the "Business Event Queue" app and confirmed that a new event is in the queue. I'm not sure, but I think the fact that I see multiple events in "Business Event Queue" means that things are stuck in S/4HANA.

Alas, there's nothing in the queue in Event Mesh.

image.png

Tobias Griebe : S/4HANA events are not making it to Event Mesh and I'm sure it's because I've made a configuration mistake. I'd appreciate it if you could you look this over and see if you can find my mistake(s).

Attachments

image.png (48.6 kB)
topic-space.png (118.4 kB)
image.png (69.8 kB)
topic-space.png (106.0 kB)