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

Conversion decimal to exponential format

geetha_k
Active Participant
0 Likes
1,679

Hi to all,

I have a small requirement in PM module. In IK11 tcode we r giving the measurement point reading in decimal point.But in database table it will store in exponential format.

For example. If we will give measuremetn point reading - 55.0 (in measurement point category temperature). But it will save in database table like 3.4814999999999998E+02.But i dont know which function module will use to convert decimal to exponential format.Please tel me which function module will use......

Regards

Geetha

5 REPLIES 5
Read only

Former Member
0 Likes
1,205

try this fm

RRBA_CONVERT_PACKED_NUMBER

Read only

Former Member
0 Likes
1,205

Hi

Pass the data in the decimal format the system will internally convert it Floating point format

or try this out

data : var(4) type p decimals 2 value '10.22',

float type f.

float = var.

write float.

regards

Ramchander Rao.K

Read only

Former Member
0 Likes
1,205

Hi,

you can directly use EXP function.

Check this code sample.

DATA: RESULT TYPE F,

PI(10) VALUE '3.141592654'.

RESULT = exp( PI ).

WRITE RESULT.

Thanks

Read only

Former Member
0 Likes
1,205

Try CHAR_FLTP_CONVERSION_TO_SI

Read only

Former Member
0 Likes
1,205

Dear Geetha,

Please check this thread Simple routine to convert exponential values to float that solves this issue.

Regards,

Mohammed Mohsen