Overview:
Once again, we can use the NetWeaver Add-On for Event Enablement to send data to SAP Event Mesh in the Integration Suite (EMIS) with just configuration. This tool provides everything we need to define which tables and data we want to send in real-time to EMIS. The add-on operates in an event-based architecture, allowing us to choose which events we want to react to, all through configuration—no code needs to be written. In this example, we’re sending data every time someone changes a purchase requisition.
Prerequisites:
NetWeaver Add-On for Event Enablement is installed.SAP Integration Suite Service is available. For more information, see “Initial Setup of SAP Integration Suite”.Further information on EMIS: Meet your new friend EMIS: Event Mesh in SAP Integ… – SAP Community.
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.
Step 3. Under the Instances tab, select the Event Mesh Service instance by clicking the arrow next to it.
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.
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.
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:
Transaction: STRUST Select the Certificate List used in the RFC destination created earlier. Click the “Import Certificate” button. Click the “Add to Certificate List” button.
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.
Logon and Security
Here you can keep the default settings.
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.
2.2 Create Message Type
In the next step we will add a message type which we first create in transaction WE81.
After that we activate the change pointers for that in transaction BD50.
2.3 Connection and Replication Object Customizing
Navigate to transaction SPRO –> IMG –> SAP NetWeaver AddOn for Event enablement –> Connection and Replication Object Customizing.
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.
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.
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.
Event Linkage
Link the Outbound Object to the BOR BUS2105 (Purchase Requisition) and the CHANGED event.
Header Attributes
Add the required Header Attributes, including SAP_EM_TOPIC, to specify where the data will be sent.
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
Watch the events being published to the SAP Event Mesh Integration Suite (EMIS).
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.
Overview: Once again, we can use the NetWeaver Add-On for Event Enablement to send data to SAP Event Mesh in the Integration Suite (EMIS) with just configuration. This tool provides everything we need to define which tables and data we want to send in real-time to EMIS. The add-on operates in an event-based architecture, allowing us to choose which events we want to react to, all through configuration—no code needs to be written. In this example, we’re sending data every time someone changes a purchase requisition. Prerequisites: NetWeaver Add-On for Event Enablement is installed.SAP Integration Suite Service is available. For more information, see “Initial Setup of SAP Integration Suite”.Further information on EMIS: Meet your new friend EMIS: Event Mesh in SAP Integ… – SAP Community. 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. Step 3. Under the Instances tab, select the Event Mesh Service instance by clicking the arrow next to it. 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. 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. 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: Transaction: STRUST Select the Certificate List used in the RFC destination created earlier. Click the “Import Certificate” button. Click the “Add to Certificate List” button. 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. Logon and Security Here you can keep the default settings. 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. 2.2 Create Message Type In the next step we will add a message type which we first create in transaction WE81. After that we activate the change pointers for that in transaction BD50. 2.3 Connection and Replication Object Customizing Navigate to transaction SPRO –> IMG –> SAP NetWeaver AddOn for Event enablement –> Connection and Replication Object Customizing. 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. 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. 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. Event Linkage Link the Outbound Object to the BOR BUS2105 (Purchase Requisition) and the CHANGED event. Header Attributes Add the required Header Attributes, including SAP_EM_TOPIC, to specify where the data will be sent. 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 EMISWatch the events being published to the SAP Event Mesh Integration Suite (EMIS). 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. Read More Technology Blogs by Members articles
#SAP
#SAPTechnologyblog