2015 Apr 13 8:45 AM
Hi,
I am using the BADI 'CHANGE_DATA_AT_SAVE' while saving notification using tcode 'IW22'. I want to throe error message based on some condition.
MESSAGE: 'XXXXXX ''1'' ' TYPE 'E'.
But this will display as Information. Is it possible to display as error message.
Regards,
Manju
Hi,
I am using the BADI 'CHANGE_DATA_AT_SAVE' while saving notification using tcode 'IW22'. I want to throe error message based on some condition.
MESSAGE: 'XXXXXX ''1'' ' TYPE 'E'.
But this will display as Information. Is it possible to display as error message.
Regards,
Manju
2015 Apr 13 8:51 AM
Hi,
Can you try with 'DISPLAY AS 'E'. after message statement.
regards,
Praveer.
2015 Apr 13 9:36 AM
Hi Manju,
That is the expected behaviour of the BADI.
Try to pass the values explicitly as
EV_SUBRC = 1
EV_MSGID = 'ZIW22'
EV_MSGTYPE = 'E'
EV_MSGNO = '002'
EV_MSGV1 = 'Your message'.
Regards,
Kannan
2015 Apr 13 10:07 AM
Hi Manju.
You can not add error message directly in most of the BADI implementation. Only way to populate any message is by passing values in EV variables which is provided by SAP itself in BADI parameters to display message. Sample code is given by Kannan in his last post.
Regards,
Shreyes Sorte
2015 Apr 13 11:25 AM
Hi All,
thanks to all of you. I have done as Kannan suggested. It is working now.
regards,
Manju
2015 Apr 13 11:44 AM
Hi Manju,
Happy to hear that solution worked for you.
Regards,
Kannan
2015 Apr 17 2:20 PM
Hi
Now i'm facing another issue. teh BADI is NOTIF_EVENT_SAVE and method is 'CHANGE_DATA_AT_SAVE'. when i create notification using tcode IW21, badi throws error message and screen stops. but notification is created. is there any way to prevent the creation of notification
Regards,
Manju