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

Problem while Concatinating in new line

Former Member
0 Likes
388

Hello Gurus,

I am facing a slight problem in concatination of two character variables ..

Followingis my code:

DATA: text1(100) value 'ABCD'.

DATA: text2(100) value 'PQRS'.

CONCATENATE text2 text1 into text2.

Now I want output like this:

ABCD

PQRS

So how can I separate both by new line .. I tried using separated by cl_abap_char_utilities=>newline but it's printing # instead of going to new line ..

Kindly help ..

2 REPLIES 2
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
362

just try seperated by (some value)

Then try split into table

Example

concatenate text1 text2 into text3 separated by '&'.

split text3 at '&' into table itab.

Read only

ThomasZloch
Active Contributor
0 Likes
362

Well, don't concatinate them in the first place, if you want them separate

Thomas