on 03-29-2017 2:03 PM
Hi All,
How to close the notification automatically when we set the "Do not execute" for a maintenance order through IW22 and then go to WO i.e IW32. Path "ORDER->Functions->Complete->Do not execute", the maintenance order and its associated notification is getting closed but the same thing when we execute through tcode IW22 the notification linked to this is not getting closed automatically. Is it a standard functionality? If it is a standard then is there any Exits/BADI's available to achieve this requirement?
Thank you
Ajinkya
Here is solution for your issue.
Put the following code in the include ZXWOCU07 of theexit suggested above (user-exit IWO10009 ).
DATA: i_stat LIKE jstat OCCURS 0 WITH HEADER LINE.
DATA: syst TYPE bapi2080_notsti.
CALL FUNCTION 'STATUS_READ'
EXPORTING
objnr = caufvd_imp-objnr
only_active = 'X'
TABLES
status = i_stat.
LOOP AT i_stat.
IF i_stat-stat = 'I0015'.
CALL FUNCTION 'BAPI_ALM_NOTIF_CLOSE'
EXPORTING
number = caufvd_imp-qmnum
syststat = syst.
ENDIF.
ENDLOOP.
I tested the code, working well. You may test it and deploy.
Important:
This might not work if your Notification is not ready for NOCO. Means it is having some checks incorporated through other exits (like mandatory fields etc). and they are not fulfilled.
Good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you K Jogeswara Rao. The sample code is working for me.
Thank you once again
Greetings Ajinkya,
It is by standard that the Notification is not completed. The rationale behind that is that if the work had not been completed (setting system status NCMP), then in the process it might be required that the work requestor should review and close the Notification, so they are aware about the work having been cancelled.
However, in some cases you might prefer to automatically close the Notification when the Order is being folded. To that end, you might use the FM EXIT_SAPLCOIH_009 (include ZXWOCU07).
Please see the useful link from Peter Atkin above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.