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

Floating point conversation

Former Member
0 Likes
792

Dear all,

In a particular filed i entered value as 60.800 kg. But when i try to pick the value i found that the value is stored in floating pont format ie 6.080000000000e+00 . Actually i need it in integer format .Is any function module available to convert floating point to integer.

Regards

Mahesh V

5 REPLIES 5
Read only

former_member386202
Active Contributor
0 Likes
683

Hi,

Use FM KKEK_CONVERT_FLOAT_TO_CURR

Regards,

Prashant

Read only

0 Likes
683

Thanks Prashant

Read only

Former Member
0 Likes
683

<b>KKEK_CONVERT_FLOAT_TO_CURR</b>

OR

<b>CHAR_FLTP_CONVERSION .</b>

Read only

Former Member
0 Likes
683

<b>Declare it as type P</b>

i.e,

<b>Data : v_float type f,

v_dec type p decimals 3.

v_dec = v_float.</b>

<b>write : v_float, v_dec.</b>

Read only

matt
Active Contributor
0 Likes
683

Why use a function module?

DATA: l_val_int type i,
      l_val_flt type f,
      l_val_pck type p decimals 2.

l_val_flt = '6.080000000000e+00'.

l_val_int = l_val_flt.
l_val_pck = l_val_pck.

matt