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: 

Change Subtotals Positions in ALV Grid ?

Former Member
0 Kudos

hi there,

I want to put my subtotals in my ALV repot at the top of sorting documents. Right now my report look like this,

KUNNRNAME1MATNRMAKTXMENGEMEINSNETWRTOTAL
00000123XXX00101XXX3PC10003000
00000123XXX00102YYY2PC10002000
Subtotals5000
00000124CCC00201CCC2BOX5001000
00000124CCC00202DDD3BOX20006000
Subtotals7000
Grand Total12000

I need to looked like this, so our user can instantly know the subtotals if too many items in one customer.

KUNNRNAME1MATNRMAKTXMENGEMEINSNETWRTOTAL
Subtotals5000
00000123XXX00101XXX3PC10003000
00000123XXX00102YYY2PC10002000
Subtotals7000
00000124CCC00201CCC2BOX5001000
00000124CCC00202DDD3BOX20006000
Grand Total12000

Is it possible, when I use reuse_alv_grid_display? or You have any other solution?

Thank you for your attention.

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

in IS_LAYOUT of the function use this field totals_before_items

4 REPLIES 4

Former Member
0 Kudos

Once you have your output in ALV, you can simply go to the Change Layout option and on the Display tab, select the flag for 'Display total lines above the entries':

former_member156446
Active Contributor
0 Kudos

in IS_LAYOUT of the function use this field totals_before_items

Former Member
0 Kudos

Is it correct that the sub-totals must be at the top and the grand totals at the end?

Rob

0 Kudos

Well it's not a problem when the grand total at the top also. If even possible, I just want to view the subtotal only. Do you have any idea?