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

Leading Zeros for Decimal values

Former Member
0 Kudos
2,156

Hi,

In my requirement i need to add leading zeros for Decimal values.

For Example.

If the value is = 0.00 then my Target value should be = 000000000000.00

Regards,

Anil.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
795

Try using pack and unpack................

8 REPLIES 8
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Kudos
795

Hi,

Refer:

CONVERSION_EXIT_ALPHA_INPUT -


It is used to add the 0(Zero) at the begining of the value. You dont require to add zero manually for any variable.

CONVERSION_EXIT_ALPHA_OUTPUT --- It is used to Remove 0(Zero) from the Begining of the value. You dont require to remove Zero manually for any variable. Just call this Function Module and it will automatically removes zero from the begining.

Regards,

Tarun

Read only

Former Member
0 Kudos
795

Hi Tarun,

This function module is giving the output with leading zeros, this will help only for the values which is not having the decimals.

But in my requirement my values is decimals.

Anil.

Read only

Former Member
0 Kudos
795

Hi Anil,

In that case u need to copy that decimal variable to char and use conv_exit_alpha_input and use the char variable further or copy it back to decimal and check..

regards,

Dinesh.

Read only

Former Member
0 Kudos
795

hi,

use Fm CONVERSION_EXIT_ALPHA_INPUT

thanks

Read only

Former Member
0 Kudos
795

hello,

Refer the given below link

thanks

Arun

Read only

Former Member
0 Kudos
795

Hi Anil,

You have to use conversion exit ,

Kindly go through this link below:

Hope it helps

Regards

Mansi

Read only

Former Member
0 Kudos
796

Try using pack and unpack................

Read only

Former Member
0 Kudos
795

use this.

CONVERSION_EXIT_ALPHA_INPUT

CONVERSION_EXIT_ALPHA_OUTPUT