on 05-16-2016 9:53 PM
I'm trying to change the reported event code within EH ruleset activity function. I figured I'd just have to update the internal event code on the message but that didn't seem to work. No event was reported in the handler; why is this?
As you can see I reported the Departure event. Then I added a rule that if the event was 'Departure' change it to 'Arrival at In-Transit Destination'. The changed event code isn't reporting? It's configured as an Unexpected Event on the handler... What am I missing?
I've previously done this when processing idocs. Copy the standard idoc pre-process function and add some abap code...
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Jacob,
You want to retain existing event message Departure and additionally report unexpected Arrival In-Transit Destination event or you want to swap Departure to Arrival In-Transit Destination.
This looks like falls under extended check for event message before posting an event message. As Vishnu mentioned, you have to check preprocessing and post the event.
Tcode /SAPTRX/TSC0MBF.
Regards
GGOPII
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was really hoping to avoid making the change during preprocessing because I wanted to use the flexibility provided by ruleset configuration. What I'm trying to do is look at the event message Location Category and then change the event message accordingly before reporting. The other idea I had was to resend the event message 'In-Transit' and then stop processing 'Departure'; but then I'd just need to make sure I check for the event code before I check Location Category otherwise it will keep resending the same 'In-Transit' code over and over again. I was really hoping I could avoid resend in the ruleset by just updating what I needed to on the event message so that it would report to the handler as the changed code.
Hi Jacob,
a message cannot be changed anymore during ruleset.
The design in EM is that a message is stored and cannot be changed anymore. Only EH can be changed in the rule set.
Resend will in your case also not work as resending the Event Message to the same EH is not allowed. In the standard rule activity a check for that should be available. The reason is that EM reuses for performance reason instances and that lead to problems when resending Event Messages to the same EH (corrupt data, duplicate inserts)
The best place is as outlined above to use the Pre Processing function.
Here you can change the complete Event Message before it is stored and processed.
Best regards,
Steffen
Hi Jacob,
You can do similar set of action through preprocessing function. Create extra validation in plugin functional module in preprocessing whatever the business requirement and create Z table to check location category and additional fields for any validation. This would be more flexible than go through rule set.
You can also achieve internal event code, Sender code, Location etc specific and that would give more flexibility in your future modification.
Regards
GGOPII
Hi Jacob,
Try to change the event code in pre-processing activity instead of the ruleset.
In the pre-processing the structure ES_EVM_TABLES-HEADER will have event id. Try changing it and see.
Thanks,
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.