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: 

insert mulltiple empty space in a string

AJeB
Participant
0 Kudos
296

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

matt
Active Contributor
203

DATA(my_string) = | |.

DATA(my_string) = ` `.

FredericGirod
Active Contributor
0 Kudos
203

Using ' ' means CHAR ´ ´ means STRING

Sandra_Rossi
Active Contributor
0 Kudos
203

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.

jack_graus2
Active Contributor
0 Kudos
203

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