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

insert mulltiple empty space in a string

AJeB
Participant
0 Likes
1,229

how to insert multiple space in a string?
note: lv_string contains multiple space only
i tried

data lv_string type string.

if i debug the string is '' and the length is 0

4 REPLIES 4
Read only

matt
Active Contributor
1,136

DATA(my_string) = | |.

DATA(my_string) = ` `.

Read only

FredericGirod
Active Contributor
0 Likes
1,136

Using ' ' means CHAR ´ ´ means STRING

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,136

bolivs22 and to continue what Matthew and Frederic said, when a variable of type CHAR contains trailing spaces, they are ignored by most of ABAP statements, hence not appearing in the target variable of type STRING.

Read only

JackGraus
Active Contributor
0 Likes
1,136

` ` would be better here compared to | | as | | is to be used for strings containing variable ABAP data.