2008 Nov 30 6:14 AM
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.
2008 Nov 30 6:36 AM
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
2008 Nov 30 6:39 AM
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
2008 Nov 30 6:53 AM
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 .
2008 Nov 30 7:14 AM
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
2008 Nov 30 7:57 AM
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'.
2008 Nov 30 8:08 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |