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

Any Function module to pad with spaces?

former_member220941
Participant
0 Likes
1,112

Hi ,

I have  below requirement 

data :  l_var type char10.

if l_var  value  is '0000100100'. Now i want remove the leading zeros in l_var and add with spaces.

After zeros removed from l_var  exp : '    100100'. 

Please help me if any standard FM is there for this req.

Thanks in Advance.

Regards,

Venkat.

1 ACCEPTED SOLUTION
Read only

jrg_wulf
Active Contributor
0 Likes
801

Hi Venkatesh,

it's only two lines of code that you need.

SHIFT l_var LEFT DELETING LEADING '0'.

SHIFT l_var RIGHT DELETING TRAILING SPACE.

BR - Jörg

Hi ,

I have  below requirement 

data :  l_var type char10.

if l_var  value  is '0000100100'. Now i want remove the leading zeros in l_var and add with spaces.

After zeros removed from l_var  exp : '    100100'. 

Please help me if any standard FM is there for this req.

Thanks in Advance.

Regards,

Venkat.

2 REPLIES 2
Read only

jrg_wulf
Active Contributor
0 Likes
802

Hi Venkatesh,

it's only two lines of code that you need.

SHIFT l_var LEFT DELETING LEADING '0'.

SHIFT l_var RIGHT DELETING TRAILING SPACE.

BR - Jörg

Read only

0 Likes
801

Jörg,


Thanks a lot it's working....


Regards,

Venkat.