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: 

Function for Average

Former Member
0 Kudos

Hai Friends,

We can get subtotal from SET_SORTS and SET_AGGREGATIONS.

I want to get the average like subtotals. Is there any function for this.

Material     Date               Quantity

A              01-01-2009         20
                03-01-2009         10
                04-01-2009         30
-----------------------------------------------------
                                         20
-----------------------------------------------------
B             05-01-2009          100
               06-01-2009            50
----------------------------------------------------
                                           75
-----------------------------------------------------

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

you can use..........AT END OF MATERIAL

SUM.

-RICK

3 REPLIES 3

Former Member
0 Kudos

hi,

you can use..........AT END OF MATERIAL

SUM.

-RICK

Former Member
0 Kudos

Hi,

If you want your output in ALV format then you have to make use of DO_SUM= 'X' and SUB_TOTAL = 'X',

and if you want your outout in classical report then you have to make use of statements AT END OF and then SUM of your Quantity field.

Hope it helps

Regrds

Mansi

Former Member
0 Kudos

Hi,



1. Just use :

ls_fieldcat-do_sum = 'C'.


(use 'C', and not 'X')



Thanks

Arun