Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Benedikt_Sprung
Participant
10,133

Overview: 

With the release of REST Gateway as part of SAP Event Mesh in Integration Suite (EMIS), SAP events from the SAP NetWeaver Event Enablement Add-On ("ASAPIO") can now seamlessly flow into EMIS—all through simple configuration, without writing any code.

This integration solution enables us to define exactly which tables and data should be sent in real-time to EMIS. Operating on an event-driven architecture, it allows us to specify the precise business events we want to react to, such as changes in transactional or master data.

In this example, we configure the system to trigger an event whenever a purchase requisition is modified, ensuring that relevant data is instantly sent to EMIS for further processing or integration.

 

Prerequisites:  

 

1. Create RFC-Destinations 

1.1 Create RFC-Destination Connection SAP to SAP Event Mesh Integration Suite. 

To get the Host information of the SAP Integration Suite, Event Mesh Service:  

Step 1. In your BTP Cockpit, navigate to the Subaccount that contains the Integration Suite instance.

Step 2. Go to Instances and Subscriptions

Benedikt_Sprung_0-1738224274957.png

Step 3. Under the Instances tab, select the Event Mesh Service instance by clicking the arrow next to it. 

Benedikt_Sprung_2-1738224500991.png

 

Step 4. Click the View button for the Service Key to display the URI, which is located next to the protocol: httprest tag. The URI contains both the Host and Port for the RFC destination. 

Note: Ensure that you enter the host without the "https://" prefix and the ":<Port>" postfix. 

Benedikt_Sprung_1-1738224491091.png

Benedikt_Sprung_3-1738224519586.png

 

Logon and Security  

In the “Security Options” tab, set “SSL” to “Active” and select “ANONYM SSL Client (Anonymous)”. Leave the other entries as they are by default. 

Benedikt_Sprung_4-1738224542443.png

 

Add Certificate to Trust Store   

A browser-specific way to obtain the certificate is to enter the HOST URL from SM59 into the browser and download the root certificate from there. 

After that, you can upload the certificate into SAP using the following steps: 

  1. Transaction: STRUST 
  2. Select the Certificate List used in the RFC destination created earlier. 
  3. Click the "Import Certificate" button. 
  4. Click the "Add to Certificate List" button. 

Benedikt_Sprung_5-1738224562183.png

 

1.2 Token Destination 

Create the destination for the token in the same way as described above. 

In the Target System Settings section, enter the Host for the Access Token of the target system. This can be found in the Service Key of the instance from the SAP Integration Suite Event Mesh Service

Enter the postfix "/oauth/token" as the value in the Path Prefix field. 

Benedikt_Sprung_6-1738224663829.png

 

Logon and Security  

Here you can keep the default settings. 

Benedikt_Sprung_7-1738224685082.png

 

2.0 Create Outbound Interface. 

2.1 Activate BC-Set 

Business Configuration sets (BC-Set) contain customizing and configuration-related table entries that are not imported with the add-on. 

  • Transaction: SCPR20 
  • BC-Set includes: 
  • Configuration for cloud adapter 
  • Configuration for cloud codepages 
  • Definition of IDoc segments 
  • Activate the BC-Set with default values: /ASADEV/ACI_BCSET_FRAMEWORK_SEM 

 

2.1 Create Payload Design 

Go to transaction /n/ASADEV/DESIGN

Here, we will define the data that we later want to send to the SAP Event Mesh Integration Suite and use in the Payload Design of our Outbound Object

Go to the button Join Builder and insert tables from which you later want to send data. 

Here in this example, we inserted table EBAN and EBKN. 

Benedikt_Sprung_8-1738224741214.png

Benedikt_Sprung_9-1738224774591.png

 

2.2 Create Message Type 

In the next step we will add a message type which we first create in transaction WE81. 

Benedikt_Sprung_10-1738224782260.png

After that we activate the change pointers for that in transaction BD50. 

Benedikt_Sprung_11-1738224789120.png

 

2.3 Connection and Replication Object Customizing 

Navigate to transaction SPRO --> IMG --> SAP NetWeaver AddOn for Event enablement --> Connection and Replication Object Customizing. 

Benedikt_Sprung_12-1738224851628.png

 

 

2.4 Create Connection 

Create a new connection by clicking the "New Entries" button at the top. Then, enter an Instance Name, select the created RFC Destination (Upload) from the Search Help, and choose the ISO-Code and Cloud Type as you can see below in the screenshot. 

Benedikt_Sprung_13-1738224869630.png

 

Default Values 

For the "Default Values", enter the following: 

  • "SAP_EM_CLIENT_ID": This is the Client ID from the SAP Integration Suite Event Mesh Service Key. 
  • "SAP_EM_TOKEN_DESTINATION": This is the destination created in the "Token Destination" chapter for the token. 

Benedikt_Sprung_14-1738224944854.png

 

Navigate to transaction SPRO --> IMG --> SAP NetWeaver AddOn for Event enablement --> Set the cloud connection password. 

Benedikt_Sprung_0-1758610377743.png

Outbound Object 

  • Create a New Outbound Object. 
  • Add a new entry and specify the following details: 
    • Object: The name of the outbound configuration. 
    • Extraction Func. Module: /ASADEV/ACI_GEN_PDVIEW_EXTRACT 
    • Message Type: The message type you created earlier. 
    • Load Type: Incremental Load. 
    • Trace: Activate for testing purposes. 
    • Formatting Func.: /ASADEV/ACI_GEN_VIEW_FORM_CB 
    • Field Payload View Name: Name of the payload. 

Benedikt_Sprung_15-1738225038787.png

 

Event Linkage 

Link the Outbound Object to the BOR BUS2105 (Purchase Requisition) and the CHANGED event

Benedikt_Sprung_16-1738225080078.png

 

Header Attributes 

  • Add the required Header Attributes, including SAP_EM_TOPIC, to specify where the data will be sent. 

Benedikt_Sprung_19-1738225143840.png

Now that the Outbound Object is set up, it is ready to be used. 

Go to transaction ME52, make a change, and save. 

 

3.0 Test and Monitor the Message 

After making changes, monitor the system to verify if the message is successfully sent. 

Go to transaction /n/ASADEV/ACI_MONITOR. 

On the left side, you can see the JSON message that was sent. It contains all the tables and fields we defined in our Payload Design. On the right side, we can see the response from EMIS

Benedikt_Sprung_20-1738225195565.png

Watch the events being published to the SAP Event Mesh Integration Suite (EMIS). 

Benedikt_Sprung_21-1738225333873.png

 

 Summary:

Sending data to EMIS doesn't require coding with the NetWeaver Add-on for Event Enablement, and this can be done easily with many other objects in SAP through configuration. Additionally, the payload is completely flexible and can be defined in a way that ensures you get exactly the relevant data. Please leave your thoughts in the comments.

9 Comments