‎2018 Mar 19 9:36 AM
Hello everybody,
I really hope someone can help me with my problem.
In QM errors are recorded for the inspection lot via transactions QF21 or QF11. A Notification will be created in the background. If a notification already exists,
it will be extended by the new error message.
There is a requirement that a certain user status will be set in the notification as soon as an error position outside the tolerance is created or added.
To do this, I use the BAdI - NOTIF_EVENT_SAVE, which is also called if a nofication is not processed in DIALOG (eg. from transactions QF11 / QF21 / QM01 / QM02).
The user status is set if a nofication already exists.
However, the first time an error is entered for the inspection lot, the user status is not set because the FM STATUS_CHANGE_EXTERN returns the exception OBJECT_NOT_FOUND.
This is understandable because the nofication is not yet posted and no status object exists.
I also tried to create a temporary status object with the FM STATUS_OBJECT_CREATE, but I get the exception STATUS_OBJECT_ALREADY_EXISTS. When I run a commit work (as described in the documentation)
after calling FM STATUS_OBJECT_CREATE , I get the error message "General error in state processing".
Have anyone an idea how I can set a user status when creating notfication in dialog and not in dialog?
Do I use the wrong BAdI? Do I have to use the BAdI NOTIF_EVENT_POST?
I would be very grateful for every tip.
Best regards
Alex
‎2018 Mar 19 2:49 PM
Helllo everybody,
i solved the problem with the BAdI NOTIF_EVENT_POST.
Regards
Alex