2014 Nov 27 4:10 AM
Dear all,
in my alv output, 3rd column = ( 2nd column / 1st column ) * 100.
this formula is not working for total row i.e i need (20/523) * 100 = 3.82
if i give do_sum = 'X' , then 3rd column total is 100.
if i give do_sum = 'C' then 3rd column value is 6.25.
how to apply the same formula for total column also?.
Waiting for the reply,
Thanks,
Dhivya N.
2014 Nov 27 5:10 AM
Hi Dhivya,
Better don't use DO_SUM, you just write a code and calculate the total sum of those required columns and then append that as last row to your output internal table. Then you can add a color (as total) to the last row.
And apply same formula as you required before appending the row.
Regards,
Vijay
2014 Nov 27 4:59 AM
Hi Dhivya,
I recommended not to write explicit coding for Total . Please use SAP Sum button in alv toolbar on alv display screen . Please Save your layout with this functionality and make it global layout.
So each and every time you will run this report you will get grand total at the end. No need to write coding for Sum and sub sum functionality.
Don't forgot to take your layout in Transport request in which your report is exist . You can use standard program to take layout of any report in Transport request.
Hope this will work.
Regards,
Sagar.
2014 Nov 27 5:10 AM
Hi Dhivya,
Better don't use DO_SUM, you just write a code and calculate the total sum of those required columns and then append that as last row to your output internal table. Then you can add a color (as total) to the last row.
And apply same formula as you required before appending the row.
Regards,
Vijay
2014 Nov 27 5:51 AM