Business Events in S/4HANA On Premise System: Topic for Custom Events: Part 4
In my previous Blog post I covered how we could trigger Event Mesh for custom Topic; in this I will cover how we configured Custom Topic following series of steps as part of Customer requirement. This we tried before SAP releasing ADD ON for S/4HANA as our customer wanted to use Event Mesh for Custom Events as well. This was workaround for our requirement as we know that currently BEH_I_EVENT is system table; so any change in that will be lost after Upgrade and you need to re do it again after Upgrade. Steps followed to achieve this are listed below:
- Maintain Object Type and Category for your custom scenario; it should start with ZZ.Path in SPRO is listed as,
SAP NetWeaver-> Application Server->Business Management->SAP Object Type Repository->SAP Object Types->Maintain Object Type and Category
- Then go to next node: Maintain Object Representation and maintain 2 entries as shown below (SPRO, SAP NetWeaver-> Application Server->Business Management->SAP Object Type Repository->SAP Object Types->)
- Then go to next node: Maintain Object Node Type (SPRO, SAP NetWeaver-> Application Server->Business Management->SAP Object Type Repository->SAP Object Node Types->)
- Go to Eclipse and Create CDS View using template Define Abstract Entity with Parameters referring Refer D_BATCHCHANGED CDS View
@EndUserText.label: ‘Fixed Asset’
define abstract entity ZFIXED_ASSET
key CompanyCode : bukrs;
key asset : anln1;
key subasset : anln2 ;
We need to specify SAP Object Type created and our Custom event class and event name in the definition
- Cross-Application Components->Process and Tools for Enterprise Applications->Business Event Handling-> Business Object Type-> Retrieve Event details from Abstract Entity
It will automatically fetch the details; its case sensitive so enter the Object Type in Caps.
- Entry is required in View V_BOEVENT for our Custom Topic
- Also, table BEH_I_EVENT should have the CDS view entity name that we created; this can be done from maintenance view
- After all these configurations, you will be able to find this in Topics.
Now you can configure the Custom Topics and triggering Event Mesh for Topics which is already covered in Blog 3.
I am sharing what we tried as a PoC taking into consideration pros and cons and what was available then. Let’s see if SAP will continue with ADD ON for custom events for S/4HANA or eventually enhance the Topics to handle Custom events ..
This is very helpful blcg
Could you please let me know how to find SOA number( mentioned in the Step 2) for object type .
Thanks ; It can be any number starting with 9 .
Good one .
First of all many thanks for such a nice blog.
If i need to add event generation date and time, how can i do that? Abstract entity wont allow fields with _. _EVT_CREATION_DATE & _EVT_CREATION_TIME is not allowed as it expects the field to start with a letter.
Can you please help?
Thanks for writing this blog series, which was highly enlightening.
I had a query with regards to the usage of Field Restrictions in T code SWEC. We are trying to use it to filter out the scenarios, however it doesn't seem to be working for standard Business objects in Event Mesh as well as ASAPIO NW add on.
Please advise as to how we can make it work.
BEH_I_EVENT is a system table how you have been able to insert entries to it ..I'm so surprise is your Poc working ?