cancel
Showing results for 
Search instead for 
Did you mean: 

ALV aggregation function

Former Member
0 Kudos

Hi

Do u know how can I add an aggregation function to the ALV toolbar.

I know that in abap ALV (not webdynpro) there is a standard function for aggregations in the toolbar.

So u can choose a column then press the aggregation button and it will add an aggregation to the column.

Thanks

Nitsan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Peter

Thank u for your answer.

But this option : lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).

only makes it possible to aggregate a column if u choose settings at the alv toolbar , then go to calculate and then choose specific column.

I am talking about a button at the alv toolbar that when pressed will dynamically aggregate the chosen column.

This option exists at standard abap alv.

Is there a way to implement this in WD?

Thanks,

Nitsan

Former Member
0 Kudos

Hi,

To achieve this, you need to have the custom button and when the user selects the column, then use the AGGREGATION methods by passing the selected column name.

You can use the ONCELLACTION event of the ALV to capture the Column as there are no speicifc option/way to capture the column.

Regards,

Lekha.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Lekha

I hoped there is a build in way to do this.

But your answer fulfill my needs.

Nitsan

petesc82
Explorer
0 Kudos

Hello Nitsan,

under following link you find information about providing standard and alternative functions in the ALV toolbar.

Method SET_AGGREGATION_ALLOWED of interface IF_SALV_WD_STD_FUNCTIONS with parameter VALUE setting to abap_true should supply the answer to your question.

Link: [http://help.sap.com/saphelp_nw70/helpdata/en/7f/849e6d796d4fe49221609ffcbc357d/content.htm]

Regards,

Peter