Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

iw54 BADI problem

former_member211992
Active Participant
0 Likes
3,324

Dear all

I need to make few fields mandatory in iw54 for that i have used badi     NOTIF_EVENT_SAVE in the method IF_EX_NOTIF_EVENT_SAVE~CHANGE_DATA_AT_SAVE i have done some coding to make few fields  mandatory ,, i have done but while saving iw54 , it just showing error message as 'I' type pop up and notification get generated ,,

My code is :

method IF_EX_NOTIF_EVENT_SAVE~CHANGE_DATA_AT_SAVE.

data : v_message type string.

if cs_VIQMEL is not initial.

if cs_viqmel-qmtxt is initial.

Message 'Header Text is Missing' type 'E'.

elseif

cs_viqmel-ltrmn is initial.

v_message = 'Req.end date is Missing'.

MESSAGE e836(SD) WITH v_message  .

elseif

cs_viqmel-strmn is initial.

Message 'Req.start date is Missing' type 'E'.

endif.

endif.

endmethod.

how to rectify this

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,072

Hi,

In the same method can you set exporting parameters. in case of error

EV_SUBRC  = 4

EV_MSGID = 'E'

EV_MSGTYPE

EV_MSGNO

EV_MSGV1

EV_MSGV2

EV_MSGV3

EV_MSGV4

Thanks,

Kiran.

Hi,

I have tried now,  Just add the code below. it will work.

method IF_EX_NOTIF_EVENT_SAVE~CHANGE_DATA_AT_SAVE.

data : v_message type string.

if cs_VIQMEL is not initial.

if cs_viqmel-qmtxt is initial.

EV_SUBRC  = 2

EV_MSGID =  'Z1'

EV_MSGTYPE 'E'

EV_MSGNO = 'XXX'.

EV_MSGV1 = 'xxxxx'.

EV_MSGV2

EV_MSGV3

*Message 'Header Text is Missing' type 'E'.

endif.

endmethod.

15 REPLIES 15
Read only

Former Member
0 Likes
3,072

what if you try to put leave transaction or exit...

Read only

0 Likes
3,072

Thanks for ur reply,,

I need to exit..screen should be idle there should not be any navigation

Read only

Former Member
0 Likes
3,073

Hi,

In the same method can you set exporting parameters. in case of error

EV_SUBRC  = 4

EV_MSGID = 'E'

EV_MSGTYPE

EV_MSGNO

EV_MSGV1

EV_MSGV2

EV_MSGV3

EV_MSGV4

Thanks,

Kiran.

Read only

0 Likes
3,072

Hi,

I have tried now,  Just add the code below. it will work.

method IF_EX_NOTIF_EVENT_SAVE~CHANGE_DATA_AT_SAVE.

data : v_message type string.

if cs_VIQMEL is not initial.

if cs_viqmel-qmtxt is initial.

EV_SUBRC  = 2

EV_MSGID =  'Z1'

EV_MSGTYPE 'E'

EV_MSGNO = 'XXX'.

EV_MSGV1 = 'xxxxx'.

EV_MSGV2

EV_MSGV3

*Message 'Header Text is Missing' type 'E'.

endif.

endmethod.

Read only

0 Likes
3,072

Thank u kiran,,

its working but  i have passed these values to the parameter like

EV_SUBRC  = 4

EV_MSGID = 'ZIW54'

EV_MSGTYPE = 'E'

EV_MSGNO = '000'

EV_MSGV1

EV_MSGV2

EV_MSGV3

EV_MSGV4

but error message having text

An error occurred whilst processing the notification

it not showing text that i have in  msg no '000' in msg calss ziw54.

i need to show the text ' header text is missing' ,,how to acheive this

Read only

0 Likes
3,072

Hi,

Please pass the below values.

pass the message number which you want to display the text. It will work.

EV_SUBRC  = 1

EV_MSGID = 'ZIW54'

EV_MSGTYPE = 'E'

EV_MSGNO = '002'

EV_MSGV1

EV_MSGV2

EV_MSGV3

EV_MSGV4

Thanks,

Kiran.

Read only

0 Likes
3,072

yes its working but after error all the fields gets disabled how to make fields enabled in the screen.

Read only

0 Likes
3,072

yes its working but after error all the fields gets disabled how to make fields enabled in the screen.

Read only

0 Likes
3,072

user has to press enter again, it will enable. check

Read only

0 Likes
3,072

yea i checked already any other way to make it enabled without pressing enter.

Read only

0 Likes
3,072

Ok! is your issue is resoved!

Thanks,

Kiran.

Read only

0 Likes
3,072

Rewards are useful, if your issue is resolved!

Read only

0 Likes
3,072

I dont know what will happen if scn stop giving rewards  ,,anyway i got sol ,,thank u

Read only

0 Likes
3,072

Just like your company stops your salary for your work . Rewards for encouragement for new beginners  and its not for any monitor benefits.

Read only

0 Likes
3,072

Just like your company stops your salary for your work . Rewards for encouragement for new beginners  and its not for any monitor benefits.

Thanks,

Kiran.