‎2007 Jan 18 4:24 PM
Hello Guys,
How can convert a floating point value to a decimal value. I donot want the user preference of , or dot to be considered I just want a , in the value and I also dont want rounding off.
With regards,
Avisesh.
‎2007 Jan 18 4:34 PM
hi,
move the floating point value to a type P variable .
data : v_p type P decimals 3.
‎2007 Jan 18 4:39 PM
Hi,
1 - Move your field to a char field w_char.
2 - then use the "TRANSLATE" statement.
translate w_char using '.,'Hope this helps,
Erwan
‎2007 Jan 18 4:43 PM
Hello,
Use this code.
<b> DATA: CHAR1(30).
DATA: CHAR2(30).
WRITE: G_R_OBJECTS-ATFLV TO CHAR1 EXPONENT 0 DECIMALS 3.
CONDENSE CHAR1 NO-GAPS.
WRITE: G_R_OBJECTS-ATFLB TO CHAR2 EXPONENT 0 DECIMALS 3.
CONDENSE CHAR2 NO-GAPS.</b>
Hope this will helps you.
Vasanth