cancel
Showing results for 
Search instead for 
Did you mean: 

can i store carriage return in variable of type string

ankit_doshi
Participant
0 Kudos

suppose there are 4 variables of type STRING w1 w2 w3 and w4

i would want to store carriage return(Enter Key) in variable w1 and w3

variable w2 will contain some text

and then i will concatenate the string w1 w2 w3 into variable w4 so that variable w4 will contain the following:

carriage return

+ text from variable w2

+ carriage return

Is this possible?

Accepted Solutions (0)

Answers (1)

Answers (1)

anup_deshmukh4
Active Contributor
0 Kudos

Yes you can do it...!

all the escape character like new line / carriage return and tab you will get in class

CL_ABAP_CHAR_UTILITIES attributes

data : char1 type c,

data : name type string value 'abcdefg'.

char1 = CL_ABAP_CHAR_UTILITIES=>CR_LF . " CR_LF is a attribute Carriage Return of the above class

concatinate name char1 into name .

Edited by: Anup Deshmukh on Sep 9, 2010 1:47 PM