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

ALV Object model :Average and count

Former Member
0 Likes
1,043

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
Read only

mvoros
Active Contributor
0 Likes
790

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
Read only

mvoros
Active Contributor
0 Likes
791

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

Read only

bryan_cain
Contributor
0 Likes
790

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