Application Development 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: 

SALV - How to Omit Grand Total Aggregation?

Former Member
0 Kudos

I have sort/aggregations declared like:

gr_sorts = gr_alv->get_sorts( ).
    gr_sorts->add_sort( columnname = <fieldname> sequence = 2 subtotal = abap_true ).  

 TRY.
        gr_aggreg = gr_alv->get_aggregations( ).
        gr_aggreg->add_aggregation( a field ).
        gr_aggreg->add_aggregation( another field ).

.....
ENDTRY.

This results in the subtotals that I want. But, it also results in a grand total row that I must remove. How does one tell SALV to produce the subtotals only, without the final total row?

4 REPLIES 4

Former Member
0 Kudos

HI,

Try this:

Define layout structure
DATA:wa_layout TYPE slis_layout_alv.

Set this one
wa_layout-no_totalline = 'X'.

Pass this one through REUSE_ALV_LIST_DISPLAY function module.
is_layout = wa_layout

I know this is not OOPS, but i guess this gives you some idea.

May it helps you.

Regards.

DS.

Former Member
0 Kudos

In the set table for first display method, set the field NO_TOTLINE in the layout. Hope it helps.

Cheers

Sujay

0 Kudos

Guys...read the post SALV

0 Kudos

Guys...read the post SALV