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

Get Average using Subtotal Value in ALV

Former Member
0 Likes
1,291

Hi experts,

i have a question. is it possible to get the average using the value in subtotal field in ALV OO.

example:

Total Value GL Price Amount GL Price %

1 2 50

2 6 33.33

3 8 37.5

subtotal: 6 subtotal: 16 subtotal: 37.5

GL Price % Sub total computatiom:

= 6 / 16 * 100

= 37.5

i already used ls_fcat-do_sum = 'C'. but it's giving me a wrong figure.

please help...

Thank You.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
786

Hi,

Try using 'SORT' .

Sort the table to indicate on which level average has to be done. This enables 'ls_fcat-do_sum = 'C' to work correctly.

Regards,

Sharin

3 REPLIES 3
Read only

Former Member
0 Likes
787

Hi,

Try using 'SORT' .

Sort the table to indicate on which level average has to be done. This enables 'ls_fcat-do_sum = 'C' to work correctly.

Regards,

Sharin

Read only

0 Likes
786

Thanks Sharin! now it's giving the correct figure...

regards,

bernadette

Read only

Former Member
0 Likes
786

Hi,

Use the below threads to solve your issue.

Regards,

Saravana.S