Quantcast
Channel: SCN : All Content - User Interface Development in ABAP
Viewing all articles
Browse latest Browse all 540

ALV subtotal not recalculating/refreshing in cl_salv_table

$
0
0

Hi Folks,

 

This is an interesting one - I have a screen (100) that allows the user to select an item. Once selected the next screen (200) shows the details for this item with preconfigured sorts and sub-totals. This is done using sorts and aggregation as the snippet below shows:

 

     gr_sorts = go_alvm->get_sorts( ).     gr_sorts->add_sort( columnname = 'COMPANY' subtotal = abap_true ).     gr_sorts->add_sort( columnname = 'S_MATNR_I' subtotal = abap_true ).     gr_sorts->add_sort( columnname = 'CYCLE' subtotal = abap_true ).     gr_agg = go_alvm->get_aggregations( ).     gr_agg->add_aggregation( 'INJECTION' ).     gr_agg->add_aggregation( 'DELIVERY' ).     gr_agg->add_aggregation( 'NETT' ).     gr_agg->add_aggregation( 'VALUE' ).

 

 

 

Here is the problem - the first ALV is called and displayed correctly. The user returns to screen 100 to make another selection. The refresh( ) method is called, but the sub-totals and totals are not refreshed. It will display totals and sub-totals from the previous item, even though the actual line items that are displayed are correct. For example in the first ALV:

 

Amount

100

-150

350

-


300

 

Next ALV:

 

Amount

25

30

54

-


300    <---- Clearly coming from previous ALV display.

 

 

Has anyone encountered this problem? (cl_gui_cfw=>flush( ) does not work)

 

TIA

 

Alistair


Viewing all articles
Browse latest Browse all 540

Trending Articles



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