Sub totla in ALV Grid
In my alv grid i want to add the cost of materials vendor wise, which should appear as sub total at the end of records of a particular vendor(internal table sorted by vendor).the sum of the material should appear as a sub total.help me in this regards.
Vijay Dudla replied
in the fieldcatalog population for the TOTAL_COST field enable the option DO_SUM.
fieldcat-fieldname = 'TOT_COST'. fieldcat-do_sum = 'X'. .... .. append fieldcat to it_fieldcat.
if you want the same to cons_cost then check the same.
and For subtotals.
You have to do this..
sort-fieldname = 'LIFNUM'. sort-up = 'X'. sort-subtot = 'X'. append sort to it_sort.
pass this it_sort to the it_sort option of the Set table display method.