a month ago
Hello Experts,
I am exploring the event mesh functionality on BTP Cloud Integration Suite. My scenarios is when a sales order item delivery date is changed, I need to send an event to BTP Event Mesh. I know standard event topic 'sap/s4/beh/salesorder/v1/SalesOrder/ItemChanged/v1' is available but it is sent for any change on sales order item. I think this cannot be achieved with mere filtering by any properties.
Is there any way I can influence the event publish from SAP S/4HANA Cloud to send only in case of change to delivery date if sales order item?
If not, the event consumer has to call s/4hana cloud api to get the sales order detail. In this case how can we know that delivery date has changed and not any other fields?
Best regards,
Sumit
Request clarification before answering.
You cannot.
And I think you should not. That's not how Event-driven Architecture should work. You need to work with what the events give you. What I suggest: You need to store the delivery date on BTP and compare yourself when you get a Changed event. To get the data, you can either read the data with an API call or create a derived event which contains any data you need, e.g. the delivery date. There are problems with putting too much data into the event (DPP/GDPR, security) why you want to use an API call, this is scenario and business-driven.
At this point in time we have no technical access to what has changed - generically that is just not available. Maybe, one time in the distant future, we may look at utilizing Change Documents. Alternatively, you could create a local event handler that processes the event and somehow find out if the date has changed (probably through a local persistency), if you really, really need to make sure to only send changed events.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @JChristophNolte for your inputs. I understand the event-driven architecture should not be loaded with too much data. My question was rather in the context of event producer's side, in this case, SAP S/4HANA Public Cloud, if there is any possibility to suppress event publishing conditionally and locally inside S/4HANA. I would also have loved change documents in SAP S/4HANA exposed as API in this case.
Hi SumitKundu,
(I think I accidentally "accepted" your reply, so I cannot reply directly ... hope you still receive this.)
To answer your questions: Well, yes. What we have in S/4HANA is outbound filtering. You can filter on data from the payload; this requires (at this point in time) that you extend the event with context parameters. There is a tutorial available:
https://developers.sap.com/tutorials/abap-environment-maintain-filters-outbound-events.html
You can mix that with a derived event to add to the payload whatever you want to filter on - if it is somewhere stored on the database (or rather: accessible through some - released - view). So a change would be hard to filter on, but a simple "SalesOrderType = 1000" is possible.
Great question @SumitKundu . Unfortunately, it is not possible at the moment to do "conditional" event publishing in case of a specific field being updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.