Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SALV Tree aggregation

former_member194669
Active Contributor
0 Likes
522

Hi,

I am setting TOTAL aggregation in SALV Tree . But after displaying Tree aggregations are not getting result.


  data:
    l_aggregations type ref to cl_salv_aggregations.
    l_aggregations = gr_tree->get_aggregations( ).
    l_aggregations->clear( ).
  try.
      l_aggregations->add_aggregation( columnname  = 'KTMNG' ).  
      l_aggregations->add_aggregation( columnname  = 'MENGE' ).
      aggregation = if_salv_c_aggregation=>maximum.
      catch cx_salv_not_found cx_salv_data_error cx_salv_existing.
  endtry.

a®

1 REPLY 1
Read only

former_member194669
Active Contributor
431

Hi,

Solved by myself.

Here is the modified code


  data:
    l_aggregations type ref to cl_salv_aggregations.
    l_aggregations = gr_tree->get_aggregations( ).
    l_aggregations->clear( ).
  try.
      l_aggregations->add_aggregation( columnname  = 'KTMNG' ).  
      l_aggregations->add_aggregation( columnname  = 'MENGE' 
                                      aggregation = if_salv_c_aggregation=>total ).
      catch cx_salv_not_found cx_salv_data_error cx_salv_existing.
  endtry.

a®