You are on page 1of 4

Introduction

This document explains how to get the calculated values at the end of particular column based on
summation values of other columns in a simple ALV report output
Below example we have three columns A, B &C
A and B has the sum Value and C has been calculated based on the sum value of column A and Column
B

Column A -> Sum -> 1+2->3
Column B -> Sum -> 3+4->7
Column C -> (Sum of column A / Sum of Column B) * 100 -> (3/7)*100 -> 42.85
Steps to be followed
Develop a normal ALV report with all the relevant inputs
1. Final Internal table should have the field rowcolor to differentiate the last row color
2. Define ALV Layout
3. Build logic for the requirement
4. Fill the field cat, layout and Call the ALV Grid function module
5. Output
STEP1 -> Final Internal table should have the field rowcolor to differentiate the last row color

STEP2-> Define ALV Layout STEP3-> Build logic for the requirement Use control break statement at last to get the summation. To differentiate the last row for colouring. fill the field ‘rowcolor’ with proper value .

just pass the parameter no_sum = ‘X’ for all the fields .STEP4-> Fill the field cat and Layout and Call the ALV Grid function module Since already we have calculated the sum.

Fill the layout and call the function module STEP5-> Output .