2006 Nov 14 9:39 AM
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
2006 Nov 14 9:43 AM
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
2006 Nov 14 9:43 AM
In filling up the field catalog you should mention
fieldcat-do_sum = 'C'.
Regards,
ravi
2006 Nov 14 9:44 AM
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
2006 Nov 14 9:47 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |