<\/p>\n
We want to notify our Node.js app in Cloud Platform that Sales Order was created. In order to achieve this we will enable Enterprise Events in our S4 and configure it this way that an event will be sent to Enterprise Messaging service after SO creation. This will be covered in this blog. Later we will create a queue, topic and webhook subscription in EM service to CPI. CPI will collect SO data via OData call and pass it to Node.js app. This part will be covered in part 2 of this blog. Last but not least, we will consume CPI message in our app and enable direct consumption from Enterprise Mesaging (part 3).<\/p>\n
Let’s take a look at more friendly representation:<\/p>\n
<\/p>\n
<\/a><\/p>\n In the third part we will cover the below scenario:<\/p>\n <\/a><\/p>\n Let’s move to the basics and enable and configure our events.<\/p>\n Actually this topic was quite well covered in other blogs and articles, but despite that I still couldn’t make it work (finally I did of course). I will refer to other materials and will not duplicate them here – you will have to read them and follow all the instructions there. I will guide you through all other things that were not mentioned.<\/p>\n So first of all – take a look at this great blog: https:\/\/blogs.sap.com\/2019\/09\/16\/sap-enterprise-messaging-for-s4hana-on-premises\/.<\/a><\/p>\n In my case SSL Standard did not work when I uploaded certificates via STRUST. Try using an Anonymous profile.<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n My queue:<\/p>\n <\/a><\/p>\n My Topic:<\/p>\n <\/a><\/p>\n <\/p>\n As you can see, I explicitly stated topic pattern but you can use “S42\/*” as stated in the article.<\/p>\n <\/p>\n It’s an old and well known transaction but it’s worth mentioning – S\/4HANA events are based on this concept. So lets move to tcode SWEC and enable events for sales order creation:<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n VERKBELEG and BUS2032 will be our sales order, event CREATED and on change. If you want to add field restrictions – feel free to do so.<\/p>\n Now, let’s move to tcode SWETYPV and create a new entry:<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n Let’s create a Sales Order in VA01. After hitting save you should see a message in your queue:<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n It’s not there? Ha! This happend to me as well (one can go mad trying to figure out why). Take a look at this topic in answers.sap:<\/p>\n First, follow instructions by Tobias:<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n It worked for me but worked the unexpected way. At first, I wanted to create a scenario with Sales Order change event but it didn?t want to work. I went into a debug mode and found out table BEH_C_SUBSCRIPTN. Values are as presented:<\/p>\n <\/p>\n <\/a><\/p>\n <\/p>\n 114 is Sales Order and 21 is CREATED event. I tried to find out how to maintain this table and it occurred it is possible as of version 1909 from Fiori app. I haven’t found any other way to change it, if you know one let me know in the comments.<\/p>\n The best answer by Tobias gives a solution for the problem (at the bottom of the thread). Just remember to create user SAP_WFRT with proper authorizations before configuration in SWU3.<\/p>\n It may happen that you will get such message in SWUE:<\/p>\n <\/p>\nEnterprise events enablement<\/h3>\n
Step 2<\/h4>\n
Step 4
\n<\/a><\/h4>\nStep 5<\/h4>\n
Step 6 (Enterprise Messaging)<\/h4>\n
Events for change document configuration (swec and swetypv)<\/h3>\n
Testing<\/h3>\n
\n
\n<\/div><\/li>\n<\/ul>\n