12-20-2011 10:37 PM
Hi experts,
Glad to see you again. Actually we've been displaying an ALV report with subtotals (DO_SUM = 'X' in field catalog).
In this link you can see the report as we get
[Image in Picasa|http://picasaweb.google.com/lh/photo/Eh945rFRLX-Ztu8Itppwts0H2hS-lrRtI1rnSIsX8rY?feat=directlink]
In the last column, we've just marked DO_SUM in field catalog structure and SUBTOT in sort table.
As seen, report is ok, but we don't want a sum at the end of the report; we need an average of the other subtotals.
We tested marking DO_SUM with other values (A, B, C, F, M...), without successful result.
We've done tests with FM REUSE_ALV_LIST_DISPLAY and class CL_GUI_ALV_GRID, with the same results.
Now, our question is, can we get an average as we need it?
Thanks in advance,
Jorge H. Rojas
12-21-2011 6:35 AM
12-22-2011 5:13 AM
HI
Instead of adding a row with the subtotals and try to freeze it, let the ALV do the work..
It looks like you can force the sum on the fieldcat with DO_SUM, and use C instead of X to get the average.
Try looking at this:
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="100965"></a>
Also, these guys seems to have changed the way the ALV calculates the totals:
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1687923"></a>
Cheers
NZAB
12-22-2011 5:53 AM
Now, our question is, can we get an average as we need it?
Yes we can do it. Please search in SCN for ALV total modification. You will get the answer.