‎2006 Feb 21 10:09 AM
i have B= 1,020.00
C= 20.00
i want a = 1<b>,</b>000
instead of that i get 1000.00
‎2006 Feb 21 10:11 AM
1000.00 and 1,000.00 is the same thing.
you can use write and the mask option
or more simple write w_quantity_field to w_char_field and you will have the 1,000.00 (if your SU3 have the good settings)
Rgd
Frédéric
‎2006 Feb 21 10:12 AM
Hi rani,
1. For that just declare
a as integer.
data : a type i.
regards,
amit m.
‎2006 Feb 21 10:13 AM
Hi use the below code..
DATA: A1 TYPE P DECIMALS 2 VALUE '1020.00',
A2 TYPE P DECIMALS 2 VALUE '20.00',
A3 TYPE I.
A3 = A1 - A2.
WRITE A3.
Regards,
Abdul Hakim
‎2006 Feb 21 10:21 AM
i tried and it's not work
this is the code:
DATA: lv_sum type i,
lv_sum_a type p decimals 2,
lv_mam type p decimals 2,
lv_sum_t(15) ."type p decimals 2,
lv_sum = lv_sum_a - lv_mam.
lv_sum_t = lv_sum.
condense lv_sum_t.
‎2006 Feb 21 10:22 AM
‎2006 Feb 21 10:16 AM
hi Rani,
declare a as type i field.
now you'll get the desired result ..
regards
satesh
‎2006 Feb 21 10:22 AM
it;s worst i get 100000
and before i get 1000.00
i want to get 1,000.00
‎2006 Feb 21 10:25 AM
hi Rani,
data : a type p decimals 2 value '1020.00' , b type p decimals 2 value
'20.00' , c type i.
c = a - b .
write : / c.
this gives 1,000 for me...
regards
satesh
‎2006 Feb 21 10:39 AM
Hi Umbro,
You wont get the separator in char type field.
Close this thread if ur question has been answered.
Abdul
‎2006 Feb 21 10:23 AM
hi,
You can make use of REPLACE also.
REPLACE '.' IN quant WITH ','.
cheers
Sunny
‎2006 Feb 21 10:30 AM
This will solve it,
DATA: v_var1 TYPE p DECIMALS 2,
v_var2 TYPE p DECIMALS 2,
v_var3 TYPE p DECIMALS 0.
v_var1 = '1020.65'.
v_var2 = '20.65'.
v_var3 = v_var1 - v_var2.
write:/ v_var3.
Cheers
Kathirvel
‎2006 Feb 21 10:33 AM
Hi Rani,
the following code will give an output of 1,000.00 as output..as desired by you..
data : a type p decimals 2 value '1020.00' , b type p decimals 2 value
'20.00' , c type i .
a = '1020.00'.
c = a - b .
write : / c decimals 2.regards
satesh