Skip to Content
0
Former Member
May 17, 2010 at 11:04 AM

Compute average in ALV using do_sum using different columns

231 Views

Hi Experts,

I know that the fieldcat-do_sum = 'C' calculates average of specified column in ALV. But is there a possibility that it computes average of two other columns?

Here's an example of a scenario I was talking about.

Column A values:

100

200

-


300 - Total amount

Column B values:

500

100

-


600 - Total amount

Column C values:

400

100

-


250 - Average (Here's where do_sum was declared)

The expected output should be displayed in Column C but it needs to calculate B / A, ( 600 / 300 ).

Any suggestion will highly appreciated.

Thanks!

Aura