You are on page 1of 1

How Calculate TOTALS,SUBTOTALS in ALV Reporting?

data: wa_fieldcat type slis_fieldcat_alv, it_fieldcat type slis_t_fieldcat_alv. data: wa_sort type slis_sortinfo_alv, it_sort type slis_t_sortinfo_alv. wa_fieldcat-do_sum = 'X'. append wa_fieldcat to it_fieldcat. wa_sort-fieldname = 'KUNNR'. wa_sort-tabname = 'IT_FINAL'. wa_sort-subtot = 'X'. append wa_sort to it_sort.

OR
data: wa_fieldcat type slis_fieldcat_alv, it_fieldcat type slis_t_fieldcat_alv. hi friend to calculate totals ,sub-totals we have to use after declaring the fieldcat for doing sum : wa_fieldcat-do_sum = 'X'. fro caluculating subtotal : wa_sort-subtot = 'X'. this have to be done when feildcatlog and suppliying the sorting info. I could make u to remind that this is the one of the difference between a normal & alv report.

You might also like