cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing the standard Messages / Exceptions

former_member252723
Participant
0 Kudos

Dear All,

I have a field in my application which consist of list of values and and when the user enters the value in the field which is not there in the Possible list of values the application will show the Error as The value entered is not in the possible list of values.This is the standard message i am getting it and i wanna to capture the message in some variable. How can i do that and from where i am getting this error message.

Thanks

Shareef.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member252723
Participant
0 Kudos

Solved

former_member252723
Participant
0 Kudos

Solved

Former Member
0 Kudos

Hi...

Every message have some parametes associated with that like msgid, msgty, msgno.

As any exception will occur these values will come in following parameters sy-msgid, sy-msgty, sy-msgno. Get these values in the variable in the following way And You can use it anywhere.


data: lv_errornumber TYPE symsgno,
         lv_msgid type symsgid.

lv_errornumber = sy-msgno.
lv_msgid = sy-msgid.

msgid contains the message class name.

After getting msgid go to transaction SE91 Enter the classname You will get all the messages of that class.

Regards,

Rohit