‎2009 Oct 16 10:56 AM
Hi all,
LOOP AT it_equi INTO wa_equi.
g_s_totals_flat-pmax = g_s_totals_flat-pmax + wa_equi-zzpmax.
ENDLOOP.
In wa_equi-zzpmax having value like 203.6
when doing additon g_s_totals_flat-pmax having value like 2036 .
suppose if wa_equi-zppmax have another value like 203.25
g_s_totals_flat-pmax is added with 2036 + 20325 instead of 203.6 + 203.25
pls help me out.
‎2009 Oct 16 11:02 AM
in your program attributes,check if "Fixed Point Arithmetic" check box is checked or not.
If not check the check box
Edited by: abapuser on Oct 16, 2009 12:03 PM
‎2009 Oct 16 10:59 AM
what type have you declared the fields wa_equi-zzpmax and g_s_totals_flat-pmax for.
If you can declare these as type p decimals 2 to get the conversion. Unless there's a reason you cant declare these types ?
Regards
DK
‎2009 Oct 16 11:02 AM
I even tried with p decimal 2.
when the no. is 203.5 it displays as 20.05.
when 203.25 it displays correct 203.25
Both having same data types.
‎2009 Oct 16 10:59 AM
Hello,
Please check the data type of both should be the same with same number of decimal places.
Regards,
Nabheet Madan
‎2009 Oct 16 11:02 AM
in your program attributes,check if "Fixed Point Arithmetic" check box is checked or not.
If not check the check box
Edited by: abapuser on Oct 16, 2009 12:03 PM
‎2009 Oct 16 11:03 AM
Hi,
pmax and zzpmax can be declared as Type p decimal 2.
This must solve your problem with decimals.
regards,
‎2009 Oct 16 11:05 AM
HI ,
data zppmax (10) type c.
WRITE wa_equi-zppmaxTO zppmax DECIMALS 2 LEFT-JUSTIFIED.
then add.
thnx
RK