Skip to Content
Former Member
Jun 07, 2007 at 11:50 AM

SUM for a field in ALV


Hello Guys,

CAn any one tell me how to do the SUM for a particular column in ALV.It should display at the End of the records.The column field is TYPE N(4).

My CODE is like this:

CLEAR fc_tmp.

fc_tmp-col_pos = 5.

fc_tmp-reptext_ddic = 'POINTS'.

fc_tmp-fieldname = 'POINTS'.

fc_tmp-tabname = 'ITAB'.

fc_tmp-outputlen = 15.

fc_tmp-key = 'X'.

fc_tmp-do_sum = 'X'.

APPEND fc_tmp TO fieldcat.

This is not working.

Thanks in Advance,

Take care