on 11-19-2013 1:57 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.