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 Object model :Average and count

Former Member
0 Kudos
358

Hi,

I am using ALV Object model(class CL_SALV_TABLE) .

i need to show count of row and average at the result row for two columns along with sum of other few column.

i have done with sum ,using cl_salv_aggregations->add_aggregation method.

please help me to get the average and count .

thanks in advance for your extended help.

Regards,

1 ACCEPTED SOLUTION

mvoros
Active Contributor
0 Kudos
105

He,

adding mean value (average) should be same as adding sum using class CL_SALV_AGGREGATIONS. If you check domain SALV_DO_AGGREGATION you can see all allowed aggregations.

1 Total

2 Minimum

3 Maximum

4 Mean Value

Unfortunately for you, there is no function COUNT.

Cheers

2 REPLIES 2

mvoros
Active Contributor
0 Kudos
106

He,

adding mean value (average) should be same as adding sum using class CL_SALV_AGGREGATIONS. If you check domain SALV_DO_AGGREGATION you can see all allowed aggregations.

1 Total

2 Minimum

3 Maximum

4 Mean Value

Unfortunately for you, there is no function COUNT.

Cheers

bryan_cain
Contributor
0 Kudos
105

If you add a column and populate every row with a value of 1, you can get counts using standard ALV totaling functionality.