2006 Jan 17 2:21 PM
i have itab and i want the sum of 1 field.
how?
2. i can do it by adding 1 cell only and not hole line in the alv report
2006 Jan 17 2:22 PM
2006 Jan 17 2:22 PM
For that partcicular column(field) put do_Sum = 'X' in the field catalogue.
2006 Jan 17 2:25 PM
2006 Jan 17 2:28 PM
For the fields that needs to be totaled give DO_SUM = X in the fieldcatalog FM.
Regards,
Saji.
2006 Jan 17 2:31 PM
i made it
FORM aufbauen_fieldcat USING p_fieldname
p_ref_tabname
p_name
p_sum
p_emp.
i_fieldcat-fieldname = p_fieldname .
i_fieldcat-ref_tabname = p_ref_tabname .
i_fieldcat-reptext_ddic = p_name .
i_fieldcat-seltext_l = p_name .
i_fieldcat-seltext_m = p_name .
i_fieldcat-seltext_s = p_name .
i_fieldcat-do_sum = p_sum .-- i put X
i_fieldcat-emphasize = p_emp .
APPEND i_fieldcat .
ENDFORM. " AUFBAUEN_FIELDCAT
and it's not working
2006 Jan 17 2:34 PM
Hi Liat,
how are calling the perform.
<b>
i_fieldcat-do_sum = 'X' .-- i put X</b> "give this
and try ,
regards
vijay
2006 Jan 17 2:37 PM
i tried it and it's not working
it dosnt matter because i'm calling the form
PERFORM aufbauen_fieldcat USING 'CALC' 'ITAB' ' '(006)
'X' ''.
2006 Jan 17 2:43 PM
Hi liat,
you can sum only non char fields. what is the type of field is that.
regards
vijay
2006 Jan 17 2:46 PM
2006 Jan 17 2:49 PM
not because of color, you just have tp select the column, and click on sum button. it will show the sum .
regards
vijay
2006 Jan 17 2:32 PM
hi,
use do_sum = 'X'.
populate the fieldcat for the column,
with do_sum = 'X' option.
regards
vijay