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: 

can I put 'return key' between concatenate statement?

Former Member
0 Kudos

Hi.

I want to put 'enter' between concatenate string.

anyway is it possible?

ex)concatenate 'aaa' /n 'bbb' into test.

of cause '/n' is not working..

can anybody let me know proper keyword for that?

and list of this kind of keywords would be more helpful.

thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you are talking about line feed try this

DATA LF TYPE X VALUE '0A'. "Line Feed

concatenate 'aaa' LF 'bbb' into test.

Or if are trying to have carriage return -

DATA CR TYPE X VALUE '0D'. "Carriage Return

concatenate 'aaa' CR 'bbb' into test.

Cheers.

Message was edited by: Sanjay Sinha

6 REPLIES 6

Former Member
0 Kudos

If you are talking about line feed try this

DATA LF TYPE X VALUE '0A'. "Line Feed

concatenate 'aaa' LF 'bbb' into test.

Or if are trying to have carriage return -

DATA CR TYPE X VALUE '0D'. "Carriage Return

concatenate 'aaa' CR 'bbb' into test.

Cheers.

Message was edited by: Sanjay Sinha

0 Kudos

Hi Hyung,

If you are using 4.7 or higher, you cannot concatenate hexidecimals with characters - because of unicode restrictions.

Try this:

data: cr type c value cl_abap_char_utilities=>cr_lf.

data: l_data(20) type c.

concatenate 'abcdef' cr 'gh' into l_data.

Hope this helps.

Cheers,

Pat.

PS Kindly assign Reward Points to the posts you find helpful.

0 Kudos

Hi Patrick,

Agreed . But you can always supress the syntax errors by unchecking the inicode checkbox in program attributes. We have a couple of programs running perfectly on production on 470 .

Cheers.

Sanjay

0 Kudos

Hi Sanjay,

can you tell how to uncheck unicode check

i don't know

i will thankful for your reply

regards

0 Kudos

Sanjay,

I understand what you are saying, but I believe that if you are on 4.7 it is better practice to use the ABAP Utilities class way to define tabs and carriage returns. This means that you will adhere to the unicode standards in SAP.

Hyung, if you want to turn off the unicode check, go to the Attributes of your program. In SE38 / SE80, Goto->Attributes. Towards the bottom of the screen you will see a "Unicode CHecks Active" checkbox. Untick it.

Cheers,

Pat.

0 Kudos

thank you very much all replies about carriage return.

I think ABAP utility class is more good option for this time.

and I found more codes in that utility class.

and think can use unicodes when I need to use other codes not include that utility class.

once more thank all of you.