Totals in ALV using CL_SALV_TABLE

0
787

[adsenseyu2]

In this tutorial we will learn how to add totals to the ALV report using CL_SALV_TABLE.

To add totals,

  • Get the Aggregation object of the ALV using GET_AGGREGATIONS().
  • Add Aggregation for a particular column by calling the method ADD_AGGREGATION().

Classes used : CL_SALV_TABLE and CL_SALV_AGGREGATIONS.

Create a program in SE38 and copy the below code

https://gist.github.com/prakash13t/e0e973617e49b9ae7edf#file-totals_salv-abap

Output without Totals:

alv1

[adsenseyu1]

Output with Totals:

alv1

Like us on Facebook and follow us on Twitter.

mail

SAPLearners.com is now on Telegram. Click here to join our channel and stay updated with the latest tutorials and updates.