Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 5 of 6

Connecting S/4HANA events

10 min

Listen to this lesson

0:00 / 7:51

Brokers and contracts are worthless until S/4HANA actually publishes. In SAP S/4HANA Private Edition and on premise, that is the job of enterprise event enablement: a channel connects the system to a broker, and outbound bindings choose which events go out on that channel. The business events course introduced both; this lesson walks through them as the integration team configures and tests them for each stage.

The pieces

PieceWhereWhat it does
Broker instance and service keySAP BTP (Event Mesh capability) or advanced event meshProvides the endpoint and credentials the channel uses
ChannelTransaction /IWXBE/CONFIG in S/4HANAConnects this client to one broker instance, with a namespace or topic prefix
Outbound bindingTransaction /IWXBE/OUTBOUND_CFGAssigns event topics (for example SalesOrder Created and Changed) to the channel
Custom RAP event and event bindingABAP development (ADT)Makes Contoso's own events, such as agreementClosed, publishable
Event monitoringEnterprise event enablement monitor in S/4HANA; broker monitoringShows what was sent, what failed, and queue depth

The configuration chain from S/4HANA to the broker. Transaction names follow SAP's tutorials and practitioner guides; check screens and channel types for your release.

The path of one S/4HANA business event through enterprise event enablement to a consumer queue in the test stage.
The Sign-Off Table · thesignofftable.com/academy/sap-int-206

Walkthrough: wiring CMQ to the test broker

  1. Theo creates a service key for the test broker instance and hands it to Sam through the secure channel the Basis team uses for credentials.
  2. Sam creates the channel in CMQ client 100 with /IWXBE/CONFIG from the service key, checks the technical user, and activates the channel. The channel name says which stage it serves.
  3. Theo adds the outbound binding in /IWXBE/OUTBOUND_CFG for the topics Contoso uses: SalesOrder Created and Changed, BusinessPartner Created, and the custom agreementClosed event.
  4. Priya creates a sales order for Great Lakes Fleet Services (17100001) in sales area 1710 / 10 / 00 and checks the event monitor in CMQ, then the test broker's queue for the fleet notifier.
  5. Sam repeats the setup in CMD (development broker) and, through the change process, in CMP (production broker), never copying a service key between stages.

Monitoring the S/4HANA side

Enterprise event enablement keeps its own record of what it tried to publish, and that monitor is the first place to look when consumers see nothing. Theo's team checks it daily during hypercare and then relies on alerts: a failed publish (for example after a technical user expired) and silence (no events where events are expected). Sam adds the channel's technical user and the service key credentials to the Basis calendar of expiring credentials, because an expired password is the most common cause of a sudden stop in event flow.

Stage pairing

S/4HANABroker instanceBTP consumers
CMD client 300Developmentcmc-ext-dev
CMQ client 100Testcmc-ext-test
CMPProductioncmc-ext-prod
CMR client 100 (after go-live)Pre-production (if events are needed there)cmc-ext-preprod

Contoso's stage pairing for events, matching its BTP subaccount pairing. A system copy must never carry a production channel into a test client.

The most dangerous moment is a system copy. CMR is a masked copy of CMP, refreshed quarterly. If the channel configuration came across in the copy, CMR would publish to the production broker, and production consumers would act on test changes. Sam's post-copy checklist deactivates or repoints every enterprise event enablement channel before the client is opened, and Priya's first test after each refresh is the wrong-stage test: create an order in CMR and confirm nothing reaches production.

Contoso's post-copy check for events: no test client opens until a wrong-stage test proves nothing reaches production.
The Sign-Off Table · thesignofftable.com/academy/sap-int-206
AspectStandard business eventCustom RAP event
Defined bySAP, documented in the Business Accelerator HubKenji's team, in the behavior definition
ContractSAP's AsyncAPI specification and payloadContoso's AsyncAPI document and schema
VersioningSAP releases new event versionsContoso's rules from lesson 4
PublishingOutbound binding for its topicEvent binding plus outbound binding
First testChange the business object in CMQ; see the eventClose an agreement in CMQ; see agreementClosed
Standard and custom S/4HANA events from the integration team's point of view.
The Sign-Off Table · thesignofftable.com/academy/sap-int-206

Custom events from RAP

For agreementClosed, Kenji's team declares the event in the behavior definition of ZR_CMC_CoreAgreement, raises it with RAISE ENTITY EVENT in the save sequence, and creates an event binding that maps it to a type and topic. From the broker's point of view, it is then just another event on the channel, and it needs an outbound binding like any standard event. A frequent first-test failure is exactly that: the RAP event is raised correctly, but nobody added it to the outbound binding in CMQ.

What goes wrong in testing

  • Missing outbound binding. Orders change, no events arrive, and no error appears anywhere a user would see it.
  • Wrong-stage channel. A copied client publishes to production.
  • Expired credentials. The service key or technical user expires; events queue up or fail in the S/4HANA monitor.
  • Assuming rich payloads. Standard events are mostly notifications; consumers read details by API.

What would you do?

After the quarterly CMR refresh, Wei creates test orders in CMR. The next morning, the fleet portal shows test delivery dates to Great Lakes Fleet Services. What should have prevented this?

Key points
  • Enterprise event enablement: a channel connects a client to a broker; outbound bindings choose the events.
  • No outbound binding, no event, and no visible error for users.
  • Pair stages strictly; after every system copy, repoint channels and run a wrong-stage test.
  • Custom RAP events need an event binding and an outbound binding like standard events.

Check your understanding · not graded

Lesson check

  1. 1. Which transaction creates the channel to the broker in S/4HANA?

  2. 2. Orders change in CMQ but no events arrive. What is a common cause?

  3. 3. What must happen after CMR is refreshed from CMP?

  4. 4. Which broker instance does CMQ client 100 publish to?

  5. 5. What does a custom RAP event need before external consumers receive it?