Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sub totla in ALV Grid

hii all,

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.

with regards,

sandeep akella.

Tags:
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.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question