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

concatanate statement row wise

Former Member
0 Likes
514

hi experts,

i have written a satement like CONCATENATE text1 text2 text3 text4 into text4 SEPARATED BY ',' .

its gives output as value of text1 text2 text3 text4 ,

however i need to insert data in text4 in rowwise format so that i get get data as

value of text1

value of text2

value of text3

value of text4

please suggest me how i can do this.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
457

CONCATENATE text1 text2 text3 text4 into text4 SEPARATED BY cl_abap_char_utilities=>newline.

Regards

Marcin

3 REPLIES 3
Read only

Former Member
0 Likes
457

Hi,

Concatenate 'Value of text1'  text1 into text1 seperated by space.
Concatenate 'Value of text2'  text2 into text2 seperated by space.
Concatenate 'Value of text3'  text3 into text3 seperated by space.
Concatenate 'Value of text4'  text4 into text4 seperated by space.

Is this you required?

Read only

MarcinPciak
Active Contributor
0 Likes
458

CONCATENATE text1 text2 text3 text4 into text4 SEPARATED BY cl_abap_char_utilities=>newline.

Regards

Marcin

Read only

0 Likes
457

I am not sure why do you need to concatenate if you need to print them in different lines.

If it is a complex one, you can split the text4 later into an internal table using split command and then write for each field of itab in new line.