on 12-07-2013 4:58 AM
Dear All,
Once we post the Event Handler (let say from ECC) with relevance condition as abap_true and then we delete the object in ECC such that relevance condition is abap_false now . What happens to Event Handler and its data. Does it gets deleted or EH become inactive ? .
I am facing an issue where I was creating an EH on some ECC object and then i change the object on which EH will be created . Now the tracking id of old objects is also getting linked with the new EH. The name of the tracking ID code set is same.
Thanks,
Shubh.
Hello Shubh,
you can influence this in the AO Type TR /N/SAPTRX/ASC0AO:
Indicates that an event handler for an application object is deleted (set
indicator) if the application object is no longer relevant.
The standard behavior of the application interface is that an event handler,
which is created in the Event Manager, is not deactivated or deleted unless the
corresponding application object or business object is deleted. This means that
an event handler stays active, even if the condition for the event management
relevance of an application object becomes false, having previously been true,
due to changes to the corresponding business object.
A container as part of a shipment is moved with carrier A. Shipments of
carrier A are event management relevant. If the carrier is now changed to B,
which is not event management relevant, the behavior is as follows:
Deleted means that EH is set to inactive and gets a deletion indicator. It will not be displayed then in any UI or returned by any Retrieval BAPI.
Best regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Steffen,
Thanks for your reply. I have marked the EH Deactivation Indicator in AOT. Now once i delete the object and recreated another one , the previous EH instance is marked as deleted as you mentioned above and not fetched in the UI. But the one that i have created recently has all the old info and control parameters. These old parameters were added ,let's say, on occurrence of certain event in the old EH instance. Why are the parameters fetched again and from where are they fetched ?
Thanks,
Shubh.
Hello Shubh,
if the old and the new EH have the same tracking ID and you have already sent Event Messages to the old one these messages get also processed for the new one.
When an EH is created it looks for messages with all Tracking IDs assigned to the EH that have not already processed for it.
If you want to avoid this there are several possibilities:
- make the Tracking IDs unique if possible (there are two additional fields)
- delete the Tracking IDs from the old EH
- Tracking IDs can have a Start and End Date i.e. they are only valid within a certain time frame
- delete and archive the messages that were sent to the old EH
It depends on your scenario which one is feasible and the best way.
Best regards,
Steffen
Dear Steffen,
Regarding your response that
"The standard behavior of the application interface is that an event handler,
which is created in the Event Manager, is not deactivated or deleted unless the
corresponding application object or business object is deleted."
Why is this behavior kept ? How does the application interface check that whether an object is deleted or not ?
e.g. On creation of HU for delivery on PGI we create a handler for HU ID maintained in
shipment. We do a Reversal of GI and HU for delivery is deleted. Will that delete the handler as well ?
Thanks,
Shubh.
Dear Steffen,
Thanks for your reply. I am copying the earlier reply of yours below:
"The standard behavior of the application interface is that an event handler,
which is created in the Event Manager, is not deactivated or deleted unless the
corresponding application object or business object is deleted. This means that
an event handler stays active, even if the condition for the event management
relevance of an application object becomes false, having previously been true,
due to changes to the corresponding business object."
The one in bold above says that event handler stays active even if the condition for the event management relevance of an application becomes false. But your last reply says that if the relevance condition is set to false the EH gets deleted ?
Thanks,
Shubh.
User | Count |
---|---|
8 | |
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.