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

regarding messages

Former Member
0 Likes
853

experts,

the following is the code , when executed the write statement is not getting executed, since i have framed a warning message.

along with the warning message ,write statement should be executed. is it possible.

data : var type char3.

var = 'sap'.

start-of-selection.

if var ca 'a'.

MESSAGE W001(id-001) WITH 'a PRESENT'.

ELSE.

MESSAGE S001(ID-002) WITH ' a NOT PRESENT'.

ENDIF.

write 😕 'report executed'.

thanks in advance.

experts,

the following is the code , when executed the write statement is not getting executed, since i have framed a warning message.

along with the warning message ,write statement should be executed. is it possible.

data : var type char3.

var = 'sap'.

start-of-selection.

if var ca 'a'.

MESSAGE W001(id-001) WITH 'a PRESENT'.

ELSE.

MESSAGE S001(ID-002) WITH ' a NOT PRESENT'.

ENDIF.

write 😕 'report executed'.

thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
780

hai create a message class for your program

message class t-code se91

REPORT reportname MESSAGE-ID messageclass name.

data : var type char3.

var = 'sap'.

start-of-selection.

if var ca 'a'.

MESSAGE I001."'a' present

write :/'report executed'.

ELSE.

message I002."'a' not present

write :/'report executed'.

ENDIF.

I001 & i002 will contain your message.

try this code..

regards

chinni

Read only

0 Likes
780

hi chinni,

the message should be a warning message ie of type W

Edited by: rae z on Nov 30, 2008 7:40 AM

Edited by: rae z on Nov 30, 2008 7:41 AM

Read only

Former Member
0 Likes
780

hai there 5 types of messages

A-abort

E-error

I-information

s-

W-warning

just replace the letters in the message no.

ex :

MESSAGE W001.

YOU WILL GET THE WARNING ICON .

Read only

Former Member
0 Likes
780

Hi

I think the problem is not with your message statement I think in your case

if var ca 'a' might not be working as desired .

Check if you can replace this with some other alternative.

Regards

Neha

Read only

Former Member
0 Likes
780

Use information message instead of warning.

REPORT  ZAMIT.

data : var type char3.
var = 'sap'.

start-of-selection.

if var ca 'a'.
MESSAGE 'a PRESENT'TYPE 'I'."Information message instead of warning
*BREAK-POINT.
ELSE.
MESSAGE 'a NOT PRESENT' TYPE 'W'.
ENDIF.

write :/ 'report executed'.

Read only

Former Member
0 Likes
780

This message was moderated.