‎2006 May 31 4:43 PM
Hi,
One of the variables has values stored as 2,000.000
I need to modify this to 2000
ANy ideas?
regards
Message was edited by: Nishant Gupta
‎2006 May 31 4:52 PM
‎2006 May 31 4:46 PM
‎2006 May 31 4:47 PM
‎2006 May 31 4:47 PM
‎2006 May 31 4:47 PM
‎2006 May 31 4:49 PM
i tried moving it to integer type variable..
i am getting the following message in DUMP.
"Unable to interpret " 2,000.00 " as a number."
Regards
Nishant
‎2006 May 31 4:51 PM
Try this code:
REPORT zh_test1 NO STANDARD PAGE HEADING.
data: v_val type p decimals 2 value '2000.00',
v_int type i,
v_char(10).
write:/ v_val.
v_int = v_val.
write:/ v_int.
v_char = v_int.
write:/ v_char.
REgards,
Ravi
‎2006 May 31 4:53 PM
guys,
number is " 2,000.00 "
and NOT "2000.00"
...there's a comma as well
‎2006 May 31 4:51 PM
Hi,
check this..
REPORT ZTEST_NUMBER .
data: number1(10) type p decimals 3,
number(10) type n.
number1 = '2000.000'.
move number1 to number.
write number1.
write number.Regards
vijay
‎2006 May 31 4:52 PM
‎2006 May 31 4:59 PM
‎2006 May 31 5:02 PM
Hi Nishant,
PLease note that Rich's code will work for only in countries where , is the thousands separator and '.' for decimal separator.
In some countries (JAPAN) the , is for decimals.
So take care before you implement this code.
Regards,
Ravi
‎2006 May 31 4:54 PM