[Part-3] Integrate Events between SAP and Microsoft using Event Mesh – Connectivity Bridge Service

Modern applications created using microservices usually involve an event-driven architecture, which uses events to initiate and facilitate communication between them. Three essential components comprise event-driven architectures: producers, routers, and consumers. A producer publishes an event and sends to the router, which filters and sends it to consumers. Decoupled producer and consumer services enable independent scaling, updating, and deployment. 

For small-scale eventing infrastructure, we can easily create the non-standard sender and receiver application to publish and subscribe to the events. But for large-scale eventing scenarios, the infrastructure must be highly reliable. Open standards are essential to make things work. At the same time, you want focused sub-meshes that support your businesses best. 

To avoid the difficulties of do-it-yourself or non-standard solutions, the new Event Mesh Connectivity Bridge service with the connectors to SAP S/4HANA and Azure Event Grid was introduced on October 11, 2022, in an SAP Beta Program. It is a great concept to connect apps or technologies seamlessly to event sources ensuring data security through event-driven integration.

Event Mesh Connectivity Service

The Beta version of Event Mesh Connectivity Bridge enables a direct connection between Event Mesh Connectivity Bridge and Azure Event Grid. You can develop event-driven integrations and applications using this service. See Figure-1 for more details. 

Figure-1: Event Mesh Connectivity Bridge

There are two connectors available: S4-on-premise and Azure Event Grid connector. These allow flow of events from SAP S/4HANA to Microsoft Azure Event Grid. As a result, we will be able to support the customer’s next large-scale event-driven architectures and build real-time end-to-end extension scenarios with SAP S/4HANA, SAP BTP and Microsoft Azure. 

Sample use-case implementation

An SAP Business User creates an SAP Purchase Requisition in SAP S/4HANA, which generates an event. The event gets published into a topic of Event Mesh Connectivity Bridge, from which the event gets forwarded to Azure Event Grid’s partner topic. A queue bound with this partner topic (through Event Subscription) receives the event. This event is consumed in an Azure function app and sends an email to a business user via Azure Communication Service. 

Below is the link to the GitHub repository for creating a sample application to explore the capabilities of Event Mesh Connectivity Bridge service’s integration with Azure Event Grid to send events from SAP S/4HANA to Microsoft Azure. 

Contact us for more information on Beta Program and to get access to this service in your SAP BTP Subaccount. 

GitHub repository – Integrate Events Between SAP and Microsoft using Event Mesh Connectivity Bridge Service. The content of the repository is tested on a regular basis and will be kept up to date by integrating the latest services and features. 

This repository details out all the necessary steps required for the end-to-end implementation. 

  • Set Up the Subaccount in SAP BTP 
  • Configure the Microsoft Azure platform 
  • Onboard connectors in SAP BTP 
  • Configure SAP S/4HANA 
  • Configure Event Subscription in Microsoft Azure 
  • Create Microsoft Azure Function App 

High-Level Architecture 

The overall architecture outlined in Figure-2 depicts the flow of the integration. 

Figure-2: High-level architecture

  1. Purchase Requisition is created in the SAP S/4HANA system. This change creates a notification event with the Purchase Requisition ID in the payload. 
  2. This event is published to the Event Mesh Connectivity Bridge. 
  3. Event Mesh instance with connectivity bridge service plan has two connectors (Azure Event Grid & S4-on-premise) which are configured in the subscription as publisher and subscriber. This subscription pushes the event to Azure Event Grid. 
  4. Microsoft Azure Storage Account’s queue receives the events. You can use queue storage when you have a long-running process that takes too long to respond. 
  5. When a new event is received in the queue, the Microsoft Azure Function App is triggered with the message in the queue as input. 
  6. The Azure Function App calls the Azure communication service with queue messages. 
  7. Azure Communication Service sends email notifications to the configured business user. 

Reference & Further Reading

Do read the below blog posts,  

  • “Event-to-Business actions” architecture: An event-driven framework on SAP BTP to implement Industry 4.0 scenarios with Microsoft Azure services (to be updated) by  Pavan, where he talks about how building event-driven applications in SAP BTP using Events-To-Business Actions framework and leveraging the Event Mesh Connectivity Bridge service. 
  • SAP Event Mesh: Event Connector to Microsoft Azure to go Beta by Karsten Strothmann 

Help Documentation

Event Mesh Connectivity Plan Concepts (Beta).
Get Started with Event Mesh Connectivity Plan (Beta).
SAP Event Mesh: Event Connector to Microsoft Azure to go Beta.
Subscribe to events through the portal.
Azure Event Grid documentation.
New SAP events on Azure Event Grid.

In Closing

I hope this blog post gives you an idea in terms of how you can leverage Event Mesh Connectivity Bridge to integrate events from SAP S/4HANA with Microsoft Azure. 

Special thanks to Pradeep Panda and Uma Anbazhagan for building the solution and curating GitHub Repository content. 

To learn more about SAP BTP, see the learning journey on SAP Learning called Discover SAP Business Technology Platform, a great introduction to BTP and the Intelligent Enterprise strategy to see what it’s all about for free or check out Develop Advanced Extensions with SAP Cloud SDK plus much more free learning at SAP Learning site. 

Please leave any thoughts or feedback in the comments section below and for more information about this topic or to ask a question, please contact us at paa_india@sap.com. 

Original Article:

Related blogs


Please enter your comment!
Please enter your name here