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: 

leading zeros

Former Member
0 Kudos

hi all,

how can i remove the leading and trailing zeros while processing in my internal table. i am not using write statement.can neone help me on this issue.

7 REPLIES 7

former_member156446
Active Contributor
0 Kudos

leading zeros can be removed using convertion_exit_alpha* FM..

Former Member
0 Kudos

shift <variable> left deleting leading '0'.

shift <variable> left deleting trailing '0'.

eg : <variable> = itab-mblnr etc.

Reward if u find usefull.

Thankyou.

regards,

V.Balaji

Former Member
0 Kudos

Hi,

Use SHIFT statement.

SHIFT c LEFT DELETING LEADING c1.

SHIFT c RIGHT DELETING TRAILING c1.

Ex:

SHIFT l_f_string LEFT DELETING LEADING '0'.

Edited by: Ramesh Hirial on Dec 28, 2007 3:35 PM

Former Member
0 Kudos

using

conversion_exit_alpha_output.

and u can also try no gaps statement before move statement in your internal table.

0 Kudos

hi.....

use shift <variable> left deleting trailing '0'.

or

using

conversion_exit_alpha_output.

or

if u use alv

then

ls_cat-NO_ZERO = 'X'.

or condense <variable>

regards,

Arpit

Former Member
0 Kudos

Hi abinasa ,

To remove leading zeros you need to condense statement.

Regards

Arun

Former Member
0 Kudos

thanks all