‎2008 Jul 03 1:22 PM
Hi gurus,
I have a requirement to display error list in one string.
but i have to add the errors after every validation
i have to validate at five stages
at every stage the error or success message should be add to that string.
pls help me
i will give full points if it works
Regards,
hanuma
‎2008 Jul 03 1:39 PM
Hi,
Here is the Full Report Program that solves your problem.
REPORT Z_ALL_MESSAGES
data:
w_all_msg(100).
MESSAGE 'Message1' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
MESSAGE 'Message2' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
MESSAGE 'Message3' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
write:
/ w_all_msg.
What you have to do is just write one concatenate statement after each message statement.
Regards,
rama.
‎2008 Jul 03 1:25 PM
hi use the concatenate statement..
when the error flag is set then pass the value to the variable..or fwhen success flag is set then pass the value to the same variable with the if condition..
‎2008 Jul 03 1:30 PM
ok i will try
but i finally i have to pass all messages to one string
‎2008 Jul 03 1:32 PM
check this...
parameters:p_error type c .
data: test type n value '02',
message(30) type c ,
data(100) .
if p_error = 'X'.
message = 'this is error'.
concatenate message test into data.
write:/ data.
else.
message = 'this is success'.
concatenate message test into data.
write:/ data.
endif.
‎2008 Jul 03 1:34 PM
data: str1(2500) type c,
str2(1000) type c.
concatenate str1 str2 into str1.
str1 is the finala strings containing the message.
Hope this help you.
‎2008 Jul 03 1:39 PM
Hi,
Here is the Full Report Program that solves your problem.
REPORT Z_ALL_MESSAGES
data:
w_all_msg(100).
MESSAGE 'Message1' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
MESSAGE 'Message2' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
MESSAGE 'Message3' TYPE 'I'.
concatenate w_all_msg sy-MSGV1 into w_all_msg.
write:
/ w_all_msg.
What you have to do is just write one concatenate statement after each message statement.
Regards,
rama.
‎2008 Jul 03 1:41 PM
Hi venkat , nitya sundar, ramachary
than you
i will try
Edited by: hanuma on Jul 3, 2008 2:42 PM