Application Development 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: 

String concatenation with both space and newline

former_member806437
Participant
0 Kudos
822

Hi experts,

I need to concatenate strings to a variable in below way.

Concatenate str1 space str2 (two strings separated by space and then next line)

str3 space str4

str5 space str6

into var1 separated by cl_abap_char_utilities=>cr_lf.

Please help me to provide solution.

Thanks in advance.

1 ACCEPTED SOLUTION

Mahmoud-Farag
Participant
653

Try:

Data(VAR1) = |{ STR1 } { STR2 } \n { STR3 } { STR4 }|.

you can search for : embedded expressions : string format.

hope that help

2 REPLIES 2

Mahmoud-Farag
Participant
654

Try:

Data(VAR1) = |{ STR1 } { STR2 } \n { STR3 } { STR4 }|.

you can search for : embedded expressions : string format.

hope that help

0 Kudos
653

Hi Farag,

Thank you so much. It is working super fine now.