Application Development and Automation 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: 
Read only

average in alv grid display

Former Member
0 Likes
710

hi,

how to calculate avegarge in alv.

for example for one purchase order there are five line items with differnt netprice.

how to calculate average of this purcahse order.

remember in alv grid display

regards,

Sunil.k

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
531

In filling up the field catalog you should mention

fieldcat-do_sum = 'C'.

Regards,

ravi

hi,

how to calculate avegarge in alv.

for example for one purchase order there are five line items with differnt netprice.

how to calculate average of this purcahse order.

remember in alv grid display

regards,

Sunil.k

3 REPLIES 3
Read only

Former Member
0 Likes
532

In filling up the field catalog you should mention

fieldcat-do_sum = 'C'.

Regards,

ravi

Read only

Former Member
0 Likes
531

Hi,

u need to populate sort table like this

lt_sort-spos = 1.

lt_sort-fieldname = 'EBELN'.

lt_sort-subtot = 'X'.

When ever there is change in PO it give the subtotal to ur price field.

Madhavi

Read only

Former Member
0 Likes
531

You can do this in ALV object model using CL_SALV_TABLE's GET_AGGREGATIONS method.

In REUSE_ALV_GRID_DISPLAY,you have to do it through code.Insert a row in the ALV internal table on change of the purchase order.This way you will have an average row for every po.