cancel
Showing results for 
Search instead for 
Did you mean: 

Where will the aggregated values of a column will be stored in WebDynpro ALV

Former Member
0 Kudos

Hello,

Im using displaying ALV data in WebDynpro. I set aggregation on amount field with aggregation type Total. Now I need to use the Total of this field for further processing. How can I get this Total value?

Please see the below coding:

IF  ls_columns-id EQ 'KWERT'.
       FREE: lo_field, lo_aggr_rule.
       lo_field = io_alv_model->if_salv_wd_field_settings~get_field( fieldname = ls_columns-id ).
       lo_aggr_rule = lo_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total ).
ENDIF.

Now Total will get displayed for the field KWERT. Now I need to store this total value in a variable.

In short where the aggregated values will be stored?

Helpful answers will be appreciated.

Thank you!

Best regards

Sasi

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

The aggregated value will internally be calculated and stored in internal table 't_measure' attribute of method DO_AGGREGATION in class CL_SALV_WD_SERVICE_MANAGER.

There is no provision to retrieve this value( unless you enhance the mentioned class and store the value in some shared object). Moreover the aggregated value will be calculating by looping the internal table in the mentioned method.

So I would suggest, Instead of trying to retrieve the value( by enhancing) you could simply, read the context node and loop the internal table and calculate total.

Hope this helps u,

Regards,

Kiran

Former Member
0 Kudos

Thank you Kiran.

Answers (0)