Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Subtotal button to ALV IDA toolbar report?

7 REPLIES 7

kmoore007
Active Contributor
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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.

raymond_giuseppi
Active Contributor

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.

0 Kudos

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

0 Kudos

in salv

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

0 Kudos

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)

NB: Look at sample SALV_IDA_TOOLBAR_FUNCTION