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: 

Concatenate with Line Break

Former Member
0 Kudos

Hi Experts,

DATA: A TYPE C VALUE 'A',

B TYPE C VALUE 'B'.

Expected Output:

C = A

B

I want to concatenate A and B into C and after concatenate looking for above expected output.

No expecting

C = AB or A B

Edited by: Rajneesh Gupta on Jul 23, 2009 12:40 PM

Edited by: Rajneesh Gupta on Jul 23, 2009 12:41 PM

6 REPLIES 6

former_member555112
Active Contributor
0 Kudos

HI,

Can you explain the purpose of your requirment?

Do you have to write the data on 2 separate line?

Regards,

Ankur Parab

0 Kudos

Yes, I am having data in 2 different variables and and I have one text field where i have to pass the both variables values in line break like A

B

Rajneesh

0 Kudos

do one thing.

declare C as a table with one field.

pass A in first row and B in second

0 Kudos

Hi Rjneesh,

Which Data Type r u using for Variable C.

I thnk u can use cl_abap_char_utilities=>newline which prakash has specified earlier ,Else if C is a table u can do it easily.

Regards,

Lakshman.

Former Member
0 Kudos

use separated by cl_abap_char_utilities=>newline with concat statement

Former Member
0 Kudos

Hi Rajneesh,

Try this code

CONSTANTS: c_delimiter(1) TYPE c VALUE cl_abap_char_utilities=>newline

CONCATENATE A B INTO C SEPERATED BY C_DELIMITER.

Regards

Milan