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: 

exponential to decimal

Former Member
0 Kudos

hello friends,

how do v convert a exponential number(1.0199999999999999E+01) to a normal decimal number.

actually there is a keyword which can be used to convert the exp number into decimal in one step.

exp1 = 1.0199999999999999E+01.

int = keyword ( exp1 ).

does any1 have any idea about what that keyword would be?

anyother way to convert will also do

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Amit,

Check this,

data:

SOLLWERT type QPMK-SOLLWERT,

temp(16) type p decimals 2.

SOLLWERT = '1.0199999999999999E+01'.

move SOLLWERT to temp.

write: SOLLWERT,temp.

Thanks.

6 REPLIES 6

Former Member
0 Kudos

Hi Amit,

Check this,

data:

SOLLWERT type QPMK-SOLLWERT,

temp(16) type p decimals 2.

SOLLWERT = '1.0199999999999999E+01'.

move SOLLWERT to temp.

write: SOLLWERT,temp.

Thanks.

0 Kudos

hi viji,

i am getting a dump wen i do as told by u

0 Kudos

Hi Amit,

For me its working fine and I got the ouput as 10.20 from your input.

Check this code in separate Program.

Thanks.

0 Kudos

yeah thanks,

it worked for me also now

former_member223537
Active Contributor
0 Kudos

DATA: RESULT TYPE F,

PI(10) VALUE '3.141592654'.

RESULT = EXP( PI , 4).

WRITE RESULT.

Former Member
0 Kudos

Hi Amith.,

u just decalre another variable of type integer

Most ABAP Data types are inter-convertible.

So just assign the value to integer or character variable.

For eg:

data: F TYPE F VALUE '280.234',

I TYPE I .

I = F.

WRITE : I , F.

This will work..

SAP will take care by itself the conversion thing.

test it.

<b> Reward if answer solves the problem</b>

Chandra

Message was edited by:

Chandrasekhar V