cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Dear All,

I need to know a way in order to raise an error message in programme i.e when there is an error in the programme and if I run this program it should raise an error message.

With Regards,

Madhu.S.N

0 Likes
View Entire Topic
naimesh_patel
Active Contributor
0 Likes

Hello Madhu,

If you run the program with syntax error, system is giving error.

What type of checking you need. ?

Regards,

Naimesh

Former Member
0 Likes

Dear Naimesh

My question is that the program is syntatically correct and when i run the program if any run time error occurs i

have raise a message in common words.

With Regards,

Former Member
0 Likes

Hi

See the previous answers, you can use the message nr. 208 of class 00.

This message contains only & and you can replace it with your message:

IF ERROR

MESSAGE E208(00) WITH 'ERROR!!!'.

ENDIF.

Max

athavanraja
Active Contributor
0 Likes

runtime error can happen for different reasons. and if you dont catch them throw proper messages the system will dump.

to catch errors you have to use try catch block.

for example if you are are doing a multiplication you know it for sure that the if the parameters are not numbers you will get convert_no_number error. to catch that you have to do that within try catch block to catch the error.

check out this link for more info.

http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/frameset.htm

Regards

Raja

Reward points to helpful answers by choosing appropriate radiobutton in the answers.

naimesh_patel
Active Contributor
0 Likes

Hello Madhu,

You can catch some runtime errors by CATCH SYSTEM-EXCEPTIONS except1 = rc1 ... exceptn = rcn.

But Not all...!!

Refer the help on CATCH..

Regards,

Naimesh