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?

8 REPLIES 8

kmoore007
Active Contributor
0 Kudos
1,052

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
1,052

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

Former Member
0 Kudos
1,052

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
1,052

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
1,052

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

0 Kudos
1,052

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
1,052

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

BERCIWO
Explorer
0 Kudos
185

Hello did anyone find how to handle that collapse/expand button or subtotal?