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: 

ALV Subtotal

Janie1
Newcomer
0 Kudos
232

Hi everyone,

I am using REUSE_ALV_GRID_DISPLAY_LVC to display alv.

So how can i get the subtotal column value to calculate ?
Ex:

Janie1_0-1745564995531.png

I want to calculate the Success Rate at the last column in subtotal line to show the result of total Actual / total Target (the number on subtotal line)
I set do_sum for these columns and sort like that

Janie1_1-1745565213866.png

 

 

2 REPLIES 2

RaymondGiuseppi
Active Contributor
189

The REUSE_ALV_GRID_DISPLAY_LVC FM uses the CL_GUI_ALV_GRID class.

Handle the AFTER_REFRESH event of this class to update the totals/sub-totals using the GET_SUBTOTALS method and trigger a new soft display using the REFRESH_TABLE_DISPLAY method.

  • Caution: Use a flag in the AFTER_REFRESH handling method to avoid an infinite loop
  • Why did you use the FM and not the class? 

Sandra_Rossi
Active Contributor
0 Kudos
167

Possibilities to solve:

  1. Run SOS to detect ALV inconsistencies (search ALV SOS in the forum).
  2. Restart your program if you didn't do it.
  3. Empty the ALV buffer by running the program BALVBUFDEL.