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

write

Former Member
0 Likes
731

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
712

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.

6 REPLIES 6
Read only

Former Member
0 Likes
712

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..

Read only

0 Likes
712

ok i will try

but i finally i have to pass all messages to one string

Read only

0 Likes
712

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.

Read only

0 Likes
712

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.

Read only

Former Member
0 Likes
713

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.

Read only

Former Member
0 Likes
712

Hi venkat , nitya sundar, ramachary

than you

i will try

Edited by: hanuma on Jul 3, 2008 2:42 PM