Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BO Eventing

Former Member
0 Kudos
194

Hi experts,

For a requirement we would need some kind of event logger. I had a quick look at BOPF eventing but came upon some issues during testing. Can someone confirm that:

1. It is not possible to retrieve the names of the changed fields in the event handler action of the subscribing business object?  (The ATTRIBUTES table of the import parameter 'change object' is always empty. (Cf. with determinations we can do io_read->compare with import flag 'iv_fill_attributes' = true). Having a look at the stack in debug mode, it seems that the changed attributes table is never filled.

2. The event handler action is always called immediately after modify. If I only want to register changes that were saved in the subscribed BO, do I have to check this manually in the action? My action is called on modify (change_mode = U), and when saving, on reload (change_mode = X) and on lock (change_mode = E). As a consequence, one update in the subscribed BO creates 3 entries in the table of the logger BO.

The changed attributes which may trigger an event are maintained in a BRF+ decision table, so it is important to retrieve those changed attributes.

At the moment, we are considering to implement this as a determination on root node, with multiple requesting subnodes, retrieve the changed fields in check_delta and manually write to an event table in execute. Can you confirm this is the best approach, so this is not possible via BOPF eventing?

Many thanks in advance!

Kind regards,

Bjorn

1 ACCEPTED SOLUTION

former_member190794
Active Participant
0 Kudos
74

Hello Bjorn,

you can use the service manager and RETRIEVE the instance with IV_BEFORE_IMAGE=true and false. Afterwards you can compare the both images/data if you would like to derive the attributes that have been changed in the current transaction. If you would like to just react on UPDATE, you have to filter the changes accordingly in the event handling action.

Of course, implementing an own, more specific event handling functionality on your own is also a valid approach.

Best regards

Tilmann

2 REPLIES 2

former_member190794
Active Participant
0 Kudos
75

Hello Bjorn,

you can use the service manager and RETRIEVE the instance with IV_BEFORE_IMAGE=true and false. Afterwards you can compare the both images/data if you would like to derive the attributes that have been changed in the current transaction. If you would like to just react on UPDATE, you have to filter the changes accordingly in the event handling action.

Of course, implementing an own, more specific event handling functionality on your own is also a valid approach.

Best regards

Tilmann

0 Kudos
74

Hello Tilmann,

Thanks again for your insights!

KR,

Bjorn