10-09-2007 5:32 AM
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
10-09-2007 5:35 AM
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.
10-09-2007 5:35 AM
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.
10-09-2007 5:57 AM
10-09-2007 6:00 AM
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.
10-09-2007 6:06 AM
10-09-2007 5:36 AM
DATA: RESULT TYPE F,
PI(10) VALUE '3.141592654'.
RESULT = EXP( PI , 4).
WRITE RESULT.
10-09-2007 5:41 AM
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