05-11-2007 2:21 PM
Hi Friends,
Can you please help me suggesting the solutions for
conversion from format say
<b>1E+02 to 100</b>
Please suggest any conversion function modules or standard solutions for the same
Thank you
05-13-2007 8:55 AM
Check this routine -
data: a type string value '10E+02'.
data: b type f.
data: c type p.
b = a.
c = b.
write:/ b, c.
Hope this will help you.
Regards,
Amit
05-11-2007 2:26 PM
Welcome to SDN.
Check these FMs -KKEK_CONVERT_FLOAT_TO_CURR &
CHAR_FLTP_CONVERSION .
As an alternative just assign the value to type P variable and check.
Regards,
Amit
Reward all helpful replies.
05-11-2007 3:02 PM
Hi Amith,
actually i have the a character string as
a = 1E+02
it cant be changed to packed number.
i tried using the fm sent by you CHAR_FLTP_CONVERSION.
but it did not help
now the thing the character string 'a' to an integer say 100.
Could you help me now regarding this
05-11-2007 2:26 PM
Hello,
if you want to calculate the value use the following
: Exponentiation of the left with the right operand.
Example:
value = 2 ** 3.
value will have 8.
Hope this is what you need
Gabriel
05-11-2007 3:11 PM
Hi,
No need FM, you can just move field with type F to type P.
DATA: NUM1 TYPE F VALUE '1E+02',
NUM2 TYPE P DECIMALS 2.
NUM2 = NUM1.
WRITE: / NUM2.
Regards,
Ferry Lianto
05-13-2007 8:55 AM
Check this routine -
data: a type string value '10E+02'.
data: b type f.
data: c type p.
b = a.
c = b.
write:/ b, c.
Hope this will help you.
Regards,
Amit