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

ERROR MESSAGE

Former Member
0 Likes
3,522

Hi,

I want to trigger an error msg when sy-subrc <> 0 but i do not want to use any message class or message no.want to generate my own error message.

The syntax i used is

MESSAGE 'SUCCESS' TYPE 'I'.

however,i get the error message.

Three-digit error number XXX required in the 'MESSAGE EXXX.." Statement.

7 REPLIES 7
Read only

Former Member
0 Likes
1,473

Hi,

check this,

message 'error' type 'I'.

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
1,473

hi

MESSAGE i001 WITH text-026.

message i001(00) with 'sucess ful'.

regards

kk.

Read only

Former Member
0 Likes
1,473

Hi,

You can write like,

If sy-subrc <> 0.

message 'DATA ALREADY EXISTS!' type 'E'.

endif.

Regards,

pritha

Reward if helpful.

Read only

Former Member
0 Likes
1,473

hi,

create ur own message class by SE91.

there wiu can create ur own messages.

Than write like this.

MESSAGE s000(<b>zmsg_fmtr</b>)

<b>S</b> for Status Message

<b>zmsg_fmtr</b> is my message class

Hope it will b helpful.

Reward if useful.

Read only

Former Member
0 Likes
1,473

hi

pls follow as below

MESSAGE i001 WITH text-026.

message i001(00) with 'sucess ful'.

Read only

Former Member
0 Likes
1,473

hi,

you can use like

Message 'error message' type 'E'.

regards,

Read only

Former Member
0 Likes
1,473

Please try using following statement with your TEXT replacement in single quotes.

MESSAGE E999 WITH 'Please enter a valid Purch Org.'(001).

Note: you need to define a message class using statement MESSAGE-ID in the REPORT statement.

Award points, if this hint helps you.