Online Tutorials & Training Materials |
Register Login

Deleting and Adding Leading Zeros

27 Apr 2007 10:36 pm || 2

Deleting Leading Zeros

If you have a field that containg leading zeros and want to eliminate all leading zeros for a fax and e-mail report. Then you have to opt for the following code:

Either shift left deleting leading '0'


Opt for the following functional module code:


This will get rid of the zeroes before you send it to a file or whatever.

Placing Leading Zeros

One can place leading zeroes in front of a number. Like have a field that is 14 characters long but you're only reading in 10, then you can add 4 zeroes to the front of that by using the following function module:

'CONVERSION_EXIT_ALPHA_INPUT' and pass the field or even part of the field to be padded with zeroes.

Or else, you can use WRITE field using EDIT MASK '==ALPHA'.


  • 20 May 2014 12:12 pm Helpful Answer

    In pgm part... in write section ..

    for eg:

    write: empno no NO-ZERO.

    then u execute and use and see 


  • 18 Dec 2012 4:44 pm
    In the user selection screen ,when i enter input as '4000' then the number should automatically convert to '0000004000' to retrive data? plz suggest me.