Skip to Content

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

Subtotal of the columns in the ALV

Hi,

I want to do the Subtotal of the columns in the ALV by using any of the FMs:

ALV_OPTIONS_FOR_SUBTOTALS

ALV_SUBTOTALS_GET

ALV_SUBTOTALS_GET_H

But since the functional documentation is not available.

I am not getting how to use.

Please provide me the code or reply me about how to go about.

Thanks & Regards,

Pooja

Tags:
Former Member
Former Member replied

take example

fcat-REF_FIELD = 'DMBTR'.
fcat-ref_table = 'MSEG'.
 fcat-cfieldname = 'L_CURR'.    
  fcat-ctabname = 'I_OUTPUT'.

if you are populating manually what is the problem in adding the DO_SUM = 'X' , for that you are looping and doing.

*Amount O/s local
lw_fieldcat-tabname = 'I_OUTPUT'.
lw_fieldcat-fieldname = 'DMBTR'.
lw_fieldcat-outputlen = 15.
lw_fieldcat-do_sum = 'X'.
lw_fieldcat-seltext_l = text-005.
APPEND lw_fieldcat TO i_fieldcat.
CLEAR lw_fieldcat.
...

*Amount O/s document
lw_fieldcat-tabname = 'I_OUTPUT'.
lw_fieldcat-fieldname = 'WRBTR'.
lw_fieldcat-outputlen = 15.
lw_fieldcat-do_sum = 'X'.
lw_fieldcat-seltext_l = text-007.
APPEND lw_fieldcat TO i_fieldcat.
CLEAR lw_fieldcat.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question