Enterprises running SAP often need to send changes in SAP business data to external systems. For example, when a material description is changed in SAP, an external system may want the updated description to change a label. In SAP terminology, these are called “Business Events”.
Over the years, SAP has changed the way how Business Events are raised and how these events can be consumed.
One option that has been around for a very long time is Business Transaction Events (BTE) where events can be be consumed using function modules. Here’s an example of BTE in S/4HANA.
Another option that is still relevant in S/4HANA is Business Workflow Events, which allows configuring of a function module (using SWE_TEMPLATE_REC_FB as a template) or a class (that implements interface BI_EVENT_HANDLER_STATIC to consume the business event.
Most recently, SAP introduced RAP Business Events as the primary eventing mechanism for ABAP RESTful Application Programming Model (RAP). Majority of RAP based applications on both S/4HANA Cloud and S/4HANA On-Prem support RAP Business Events.
Google Cloud Pub/Sub as an event messaging platform
Pub/Sub works as a messaging middleware for traditional service integration or a simple communication medium for modern microservices. ABAP SDK for Google Cloud provides client library classes that allow SAP applications to natively call over 55 Google APIs including Pub/Sub.