cancel
Showing results for 
Search instead for 
Did you mean: 

SUBTOTALS ISSUES IN ALV / percentage column addition in alv

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

I HAVE 3 COLUMS, A,B,C

C = (A/B) * 100. ( 'C' IS THE PERCENTAGE FIELD)

NOW, WHEN I DO SUBTOTALS, CUMMULATIVE OF C FIELD IS NOT THE CORRECT PERCENTAGE.

HOW TO RESOLVE THIS?

A B C

10 20 50%

30 90 33.33

TOTAL ROW = 40 110 41.66 (41.66 IS THE AVERAGE OF THE PERCENTAGES) - THIS IS THE TOTAL ROW(INTERMEDIATE RESULTS ROW)

BUT THIS VALUE IS WRONG , THE VALUE SHOULD BE 36.36% ( 40/110 =36.36%)

Edited by: ssm on Dec 14, 2010 7:18 PM

Edited by: ssm on Dec 14, 2010 7:23 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

CAN I WRITE MY OWN FORMULAS FOR INTERMEDIATE RESULT ROW?

how can i read the values of intermediate result row?

Former Member
0 Kudos

Hi,

As the Column C calculation is done by you, when the inertmediate functionality is applied for all these columns, are you not getting the correct intermediate result. I donot find any such manipulations related methods class CL_SALV_WD_FIELD.

Have you tried out in OO ALV not in webdynpro ALV.

Regards,

Lekha.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

this is in web dynpro alv,

i have done calculation on col c, but is there any way out to overwrite or read or update the intermediate row?

As, total of A column/ total of column B * 100 = x. to calculate X, we dont have any option available in SAP

Former Member
0 Kudos

Hi,

I do not see such options. You need to build your own logic of showing those rows(intermediate results row) rather using a standard one. It may be complicated also and not suggestable. As a sandbox, you can try the option of building our own. Need to wait for Thomas Jung opinion on this.

Regards,

Lekha.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

IS THERE ANY WAY THAT WE CAN ASK THOMAS's OPINION?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

No you can't override the results row. If you need that kind of control, don't use the built in calculation, but instead build in your own summary or intermediate rows (although you probably have to disable sorting to keep such rows in place).

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

I believe that we cant even read the intermediate rows also.

Thanks thomas.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can we edit the intermediate results row?? or can we read it?

Edited by: ssm on Dec 15, 2010 4:28 PM

Former Member
0 Kudos

Hi,

Are the Domains that you have used are matching the requriement. I mean is it related to any rouding off..

Regards,

Lekha.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

it is not related to rounding the value.

I need to calculate the overal percentage of the fund usage.