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

Regarding space removal for a numeric value

Former Member
0 Likes
1,258

Hello ALL,

I have declared a vairable in my program as

LV_amount type wrbtr.

in that filed i m passing a value as 250

hence it is taking as 250.00

but the problem is it is having some space in the front,

like ' 250.00'.

I want to remove that space, how can i do that ..

Thanks,

Suresh

Hello ALL,

I have declared a vairable in my program as

LV_amount type wrbtr.

in that filed i m passing a value as 250

hence it is taking as 250.00

but the problem is it is having some space in the front,

like ' 250.00'.

I want to remove that space, how can i do that ..

Thanks,

Suresh

3 REPLIES 3
Read only

Former Member
0 Likes
1,056

Hi,

Move or write it to a character field and then use shift w_char left deleting leading space.

Regards,

Darren

Read only

naimesh_patel
Active Contributor
0 Likes
1,056

When you write the Amount field it will be written as the Right Justified and put the space in front of it. You can move it to some character field and remove the space.

Check this code:


data: l_amt  type wrbtr,
      l_char type char20,
      l_cha1 type char20.

l_amt = '123.00'.
write: / l_amt.
write: l_amt to l_char.
write: / l_char.

l_cha1 = l_amt.
condense l_cha1.
write: / l_cha1.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
1,056

This message was moderated.