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

concatenate space

Former Member
0 Likes
997

Hi Experts,

I wanted to add 5 space before my variable & wanted to store in other variable.

i.e.

concatenate ' ' lv_var into lv_new. "where there r five space in ' '.

The value of LV_NEW should look like ' TEST'. Before test there is 5 space required.

How I can do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
860

HI

do this

constants: k(5) type c value ' '. "5 spaces.

concatenate k LV_NEW respecting space. (it works depends upon the version u r using)

Regards

Aditya

7 REPLIES 7
Read only

Former Member
0 Likes
861

HI

do this

constants: k(5) type c value ' '. "5 spaces.

concatenate k LV_NEW respecting space. (it works depends upon the version u r using)

Regards

Aditya

Read only

Former Member
0 Likes
860

use like this.

lv_var = ' TEST'.

it will help you.

Regads,

Madan.

Read only

Former Member
0 Likes
860

hi neha,

just try out assigning 5 space manually into a new variable of type char(5) say to lv_space. and then concatenate lv_space lv_var to lv_new.just an assumption.try this.

reward if helpful

thanks and regards

sudipta

Read only

Former Member
0 Likes
860

Hi neha,

try this code

data: w_space type char5 value ' ',

w_value type char10.

constatns: c_value type char10 value 'ABCDEFGHIJ'.

concatenate w_space c_vlaue into w_value.

Read only

prasanth_kasturi
Active Contributor
0 Likes
860

hi,

tyr like this

data : f1(5),

f2(5) value 'SPACE',

f3(10) type c.

f3+4(5) = f2.

write f3.

reward if helpful

prasanth

Read only

Former Member
0 Likes
860

Hi,

data: test(3) type c value 'tes',

out type string.

concatenate ' ' ' ' ' ' ' ' ' ' test into out separated by ' '.

write:/ out.

I think it is useful for you.

Reward if it useful for you.

Thanks & ragards

Deepika

Read only

Former Member
0 Likes
860

Thanks All