Skip to Content

How to add Subtotal button to ALV IDA toolbar report?

Nov 29, 2017 at 05:14 PM


avatar image
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Raymond Giuseppi
Nov 30, 2017 at 07:12 AM

Did you define at least one totalized column and one sort criteria, the icon should then appear.

NB: To add custom buttons (but should not be required) you have to implement methods add_button and function_selected of interface IF_SALV_GUI_TOOLBAR_IDA. And the second method must do the work itself.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

if I have dozens of rows that is to much extra work for the user, expending each group one by one

groupby.png (13.3 kB)
after-groupby.png (31.2 kB)

in salv

In IDA I can use GroupBy but I am looking for an "Expand all" option like in the Subtotal in salv:


So you don't want to define sub-totals as I first understood, but want to handle some collapse/expand button. In this case you could implement the two events I already suggested to add functions not already existing in the menu (or use your own status with set_pf_status)


iconmenu.png (2.0 kB)
Kenneth Moore Nov 29, 2017 at 07:33 PM

I see you have a Total button in the IDA. Once you total a column, normally the Sub-Total button will display (I think).

Show 1 Share
10 |10000 characters needed characters left characters exceeded

It did not really happen, the subtotal button still doesnt appear and there is no other option availible beside grouping

ida-total.png (20.4 kB)
avatar image
Former Member Nov 30, 2017 at 06:53 AM

You can't add subtotal button, but there are some conditions that you have to fulfill to use the subtotal facility. These are :

1. There must be atleast one column of numeric type in the grid.

2. Total of atleast one column(numeric column) is mandatory. Once you performed the total of a column, the subtotal button will be enabled, now you can perform the subtotal of the column(numeric column) you want.

10 |10000 characters needed characters left characters exceeded