Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10052

Hiding grand total in ALV and make related columns appear in subtotal

$
0
0

Hi Experts,

 

I have an ALV output as follows:

WDA_ALV.JPG

 

1) I want to hide the grand total column (last row as shown in the image)

2) I want to display the Time Unit Text at the subtotal level (as shown in the first subtotal).

 

Any suggestions as how this can be achieved programatically?

 

 

Here is the code that has been written so far:

 

 

*Get Totals

  lr_field_settings ?= lo_alv_model.

  lr_field_settings->set_group_aggr_displayed( abap_true ).

  lr_field = lr_field_settings->get_field( 'NAMEOFABSENCETYPE' ).

  lr_field->if_salv_wd_sort~set_group_aggregation_allowed( abap_true ).

  lr_field->if_salv_wd_sort~create_sort_rule( ).

  lr_sort_rule = lr_field->if_salv_wd_sort~get_sort_rule(  ).

  lr_sort_rule->set_sort_order( if_salv_wd_c_sort=>sort_order_ascending ).

  lr_sort_rule->set_group_aggregation( abap_true ).

 

 

  lr_field = lr_field_settings->get_field( 'DEDUCT' ).

  lr_field->if_salv_wd_aggr~create_aggr_rule( ).

  lr_aggr_rule = lr_field->if_salv_wd_aggr~get_aggr_rule(  ).

  lr_aggr_rule->set_aggregation_type( if_salv_wd_c_aggregation=>aggrtype_total ).

 

Thanks

Akash


Viewing all articles
Browse latest Browse all 10052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>