2009 Apr 14 1:54 PM
Hi ,
while passing value to a variable as 12000000.85, it got converted to value 1.200000085E7.Is it floating value? How to convert this floating value to character value which will be again converted to 12000000.85?
Thanks
2009 Apr 14 2:10 PM
Try out this.
Data:p_float type f value '1.200000085E7',
p_packed type p decimals 2,
w_char(12).
p_packed = p_float.
w_char = p_packed.
write : w_char.Regards,
Gurpreet
Hi ,
while passing value to a variable as 12000000.85, it got converted to value 1.200000085E7.Is it floating value? How to convert this floating value to character value which will be again converted to 12000000.85?
Thanks
2009 Apr 14 1:59 PM
Hi,
Check these FM's
CHAR_FLTP_CONVERSION_TO_SI
CHAR_FLTP_CONV_TO_SI_RFC
FLTP_CHAR_CONVERSION_FROM_SI
FLTP_CHAR_CONV_FROM_SI_RFC
2009 Apr 14 1:59 PM
Use ABS statment.
Example:
data : netpr type ekpo-netpr,
amount(17) type c.
amount = ABS( netpr ).
Amount(char field) will have ur value.
Regards,
Aswin.
2009 Apr 14 2:10 PM
Try out this.
Data:p_float type f value '1.200000085E7',
p_packed type p decimals 2,
w_char(12).
p_packed = p_float.
w_char = p_packed.
write : w_char.Regards,
Gurpreet
2009 Apr 14 6:25 PM
yes you can use direct assignments to move data from fltp to char and char to fltp.
Regards,
Lalit Mohan Gupta.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |