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 value calculates

Former Member
0 Likes
757

Hi,

2.5000000000000000E+02

3.3000000000000002E-01

While I am fetching, I got the value as above,

But I need to calculate the same as normal decimal value??

I dont want to see the Exponent value. For both positive and negative, I need the logic for same???

Thanks!!

Hi,

2.5000000000000000E+02

3.3000000000000002E-01

While I am fetching, I got the value as above,

But I need to calculate the same as normal decimal value??

I dont want to see the Exponent value. For both positive and negative, I need the logic for same???

Thanks!!

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
596

check this FM

FM KKEK_CONVERT_FLOAT_TO_CURR

KKEK_CONVERT_FLOAT_TO_CURR

OR

CHAR_FLTP_CONVERSION .

CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'

EXPORTING

char_unit = 'EA'

unit_is_optional = 'X'

decimals = 0

exponent = 0

fltp_value_si = lv_atwrt_temp

indicator_value = 'X'

masc_symbol = '_'

IMPORTING

char_value = lv_atwrt

EXCEPTIONS

no_unit_given = 1

unit_not_found = 2

OTHERS = 3.

or else check the below code

Declare it as type P

i.e,

Data : v_float type f,

v_dec type p decimals 3.

v_dec = v_float.

write : v_float, v_dec.

Read only

Former Member
0 Likes
596

Hi sanjana

check this