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: 

How to delete decimal point and adding leading zeros....

Former Member
0 Kudos

Hi,

I have one requirement in the report i.e.

<b>Present Value :</b> 44567.98

<b>Expected Value :</b> 0000004456798

In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...

Thanks in advance.

Regards,

Kumar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use SPLIT and COMCATENATE fnctions.

Eg: split l_v at '.' into l_v1 l_v2

concatenate l_v1 l_v2 into l_v.

For adding leading zeros

Use FM CONVERSION_EXIT_ALPHA_INPUT.

Eg:

data: tknum type vttk-tknum value '99156'.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input = tknum

importing

output = tknum.

Sri

Message was edited by:

Sri Tayi

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use SPLIT and COMCATENATE fnctions.

Eg: split l_v at '.' into l_v1 l_v2

concatenate l_v1 l_v2 into l_v.

For adding leading zeros

Use FM CONVERSION_EXIT_ALPHA_INPUT.

Eg:

data: tknum type vttk-tknum value '99156'.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input = tknum

importing

output = tknum.

Sri

Message was edited by:

Sri Tayi

Former Member
0 Kudos

HI,

You can move that value to the Charecter field, then Replace the DOT(.) with space , then cancatenate with 6 zeros, then use the Condence statment to remove the spaces, then move that value to a Interger field

Regards

Sudheer

Former Member
0 Kudos

Hi

declare a variable

v_no type P decimals 2 value '44567.98'.

v_no_i type I.

v_num(13) type N.

v_no_i = v_no * 100.

move v_no_i to v_num.

regards

Anji

Former Member
0 Kudos

Kishore,

data : value type i.

i = '44567.98'.

i = ( i * 100 ).

Then use CONVERSION_EXIT_ALPHA_INPUT.

Regards

Aneesh.