Skip to content

Latest commit

 

History

History
64 lines (31 loc) · 5.69 KB

enable-the-consumption-of-sap-s-4hana-cloud-events-d476ff0.md

File metadata and controls

64 lines (31 loc) · 5.69 KB

Enable the Consumption of SAP S/4HANA Cloud Events

To create event-based extensions for SAP S/4HANA Cloud you need to set up the messaging between the SAP S/4HANA Cloud system and the SAP Event Mesh.

To consume SAP S/4HANA Cloud events, you need to configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant. To do so, you need to create and configure service instances for both SAP S/4HANA Cloud Extensibility service and SAP Event Mesh.

When you create a service instance in a subaccount, an event bus for this subaccount is created. All service instances in a subaccount point to the same event bus and are nothing else but clients providing access credentials for the event bus. You configure the clients using JSON descriptors. Each client has its own name which can be configured with the emname parameter in the JSON descriptor file. Thus, the client is identified with a human readable name instead of a GUID. The name of each client must be unique. As all of the clients point to the same event bus, they must have different namespaces in which to publish events. Each namespace must be unique per subaccount. Each client should publish only in its own unique namespace.

Communication flow

The SAP S/4HANA Cloud Extensibility service instance is the client which creates the SAP S/4HANA Cloud integration and provides the credentials for the SAP S/4HANA Cloud system so that the SAP S/4HANA Cloud system can send events to that event bus. The purpose of this client is to send messages to a topic. It sends messages to the namespace which was configured while creating the service instance of S/4HANA Cloud Extensibility service. See Define SAP S/4HANA Cloud Extensibility Service Descriptor JSON/YAML File

The SAP Event Mesh service instance is the client which receives the events. This service instance must have a different name and a different namespace than the ones configured for the SAP S/4HANA Cloud extensibility service instance. Since the purpose of this client is to receive messages from a different client the rules have to take care of that. So, for the SAP Event Mesh service instance, you need to configure the subscribe filter to the SAP S/4HANA Cloud Extensibility service instance. See Define SAP Event Mesh Service Descriptor JSON/YAML File.

After both instances are created and configured, you can create the topic-to-queue subscription. To do so, you first create a queue in the client that refers to the SAP Event Mesh service instance and then subscribe the topic of the namespace of the SAP S/4HANA Cloud Extensibility service to that queue. See Manage Queues in the SAP Event Mesh documentation

The service instance of SAP Event Mesh is the client which consumes the message and should be bound to the extension application.

To configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant so that SAP S/4HANA Cloud events can be produced and then consumed by applications running on SAP BTP, you need to perform the following tasks:

  1. Add the required quotas to your subaccount as follows:

    1. Assign the messaging SAP S/4HANA Cloud Extensibility service plan to the subaccount in SAP BTP you want to pair with the SAP S/4HANA Cloud tenant. See Configure the Entitlements for the SAP S/4HANA Cloud Extensibility Service.

      Note:

      You can use the service plan on regions where the SAP Event Mesh service is available.

      Note:

      The messaging service plan enables the Enterprise Eventing Integration (SAP_COM_0092) communication scenario which allows you to consume SAP S/4HANA Cloud events and create event-based extensions.

      This service plan has been renamed from sap_com_0092.

    2. Assign the required number of SAP Event Mesh instances to the subaccount in SAP BTP that you want to pair with the SAP S/4HANA Cloud tenant. See Configure the Entitlements for SAP Event Mesh.

  2. Configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant, and then configure event topics for the channel inside SAP S/4HANA Cloud tenant. See Set Up the Connectivity Between Event Mesh and the SAP S/4HANA Cloud Tenant.

  3. Enable the SAP Event Mesh for your subaccount in SAP BTP, create a queue that is specific to your application, and then subscribe this queue to the channel topic that the SAP S/4HANA Cloud tenant uses to produce events. See Enable the SAP Event Mesh Service for Your Subaccount in SAP BTP.

Related Information

What Is SAP Event Mesh?