Application Development 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 Issue with Average in Subtotal Line

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

Hi ,

Use the below link to solve your average issues.

[]

still your issue is not solved , Paste your code here , will try to solve it .

B&R,

Saravana.S

Former Member
0 Kudos

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

kesavadas_thekkillath
Active Contributor
0 Kudos

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.