cancel
Showing results for 
Search instead for 
Did you mean: 

ALV fix sum row?

mario_abel
Explorer
0 Kudos

Hi all,

I want to to fix a sum row in the ALV. Is it possilbe, that the sum row is always visible after scrolling, when the row count of ALV-Table is greater than visible ro count?

Regards,

Mario

Accepted Solutions (0)

Answers (3)

Answers (3)

mario_abel
Explorer
0 Kudos

thanks for your answers, but I only want to know, if it is possible to fix sum row in alv.

former_member199125
Active Contributor
0 Kudos

Hi Mario,

I have used below code for totals..

Data: lr_comp_if_alv type ref to iwci_salv_wd_table,

lr_column_settings type ref to if_salv_wd_column_settings.

data: lr_column type ref to cl_salv_wd_column,

lt_column type salv_wd_t_column_ref,

ls_column type salv_wd_s_column_ref,

field_amount type ref to cl_salv_wd_field,

lv_aggr_rul type ref to cl_salv_wd_aggr_rule.

Lr_column_Settings ?= lo_value.

lt_column = lr_column_settings->get_columns( ).

loop at lt_column into ls_column.

Case ls_column-id.

when 'requried total field name'.

call method lo_value->if_salv_wd_field_settings~get_field

exporting fielname = 'requried total field name'

receiving value = field_amount.

Call method field_amount->if_salv_wd_aggr~create_Aggr_rule

exporting aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total

Receiving value = lv_aggr_rul.

endcase.

endloop.

Now the total value is available in lv_aggr_rul.

Former Member
0 Kudos

Hi Mario ,

You can go with the aggregation feature in ALv .

For futher info please go through the link.

[http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/43/2582509fb24e85e10000000a422035/content.htm]

regards

Kuldeep