Remove The Leading Zero's

How to remove the leading zero's for a numeric type n and retain its length fixed i.e. 7?

Ans:

By using CONCATENATE you can take the value, which is before the decimal place and move it to one variable by keeping length as 7.

Then pass that variable into the following function module.

There is a function module called "CONVERSION_EXIT_ALPHA_OUTPUT " to remove the leading zero's.

Eg.,

  call function 'CONVERSION_EXIT_ALPHA_OUTPUT' 
    exporting 
      input   = <variable name>
    importing 
      output = <variable name>  . 

for eg., <variable Name> as ITAB-VNAME.

or

This is a script output.  So in script use this coding:

Syntax:

&symbol(Z)& 
Assuming the current date is 1.1.1994, 
&DAY& -> 01 
&DAY(Z)& -> 1 

ABAP

More Abapers Questions:

ABAP Books List
ABAP/4 Certification, Programming and Object Oriented Programming Books

ABAP Menu:
ABAP Example Hints and Tips

Return to Index:-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.