cancel
Showing results for 
Search instead for 
Did you mean: 

formula from column that have "calculate result row as summation" enabled

Former Member
0 Kudos

Dear Gurus,

In BEx, we have option to calculate result as nothing defined or summation.

In our case, result from nothing defined is different from summation and this is a common.

so, we have set to always have calculate result as summation.

for example:

1. sales quantity have result 100 (calculate result as nothing defined)

2. sales quantity have result 200 (calculate result as summation)

    => we refer to 200 as this is the correct one.

the problem comes when another column is using that column in the calculation.

for example: sales value = sales quantity * price.

the result row of sales value is using 100, not 200.

although as i mentioned, we have set summation as the calculation in query.

also, whatever the calculation we set in sales quantity.

the result row of sales value always refer to nothing-defined-value which is 100.

so, is it possible to calculate using this summation-value  in Bex query?

or if not, can we just use modify-table-class / java script?

we are looking for workaround solutions.

please help to give input

thanks

Accepted Solutions (1)

Accepted Solutions (1)

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I understand that property is only for display purpose so in case you need to use that value further in calculations of other columns then it doesn't work.

So at bex level to achieve the same----Make anew formula and put your sales quantity in it---Hit the aggregation tab---Exception aggregation as Total--Reference characteristic----choose the most granular char on which you are getting new combination of row.

Refer the below docs on further assistance on the same.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/007ba7a0-bcea-2b10-7e89-cbcb9db98...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0b8ed5b-1025-2d10-b193-839cfdf73...

Hope this helps.

Regards,

AL

Former Member
0 Kudos

Dear AL,

Thanks for the link, it was helpful!


as your advice, I have tried to create new CKF with exception aggregation, the granular char.
but unfortunately, it doesnt make any changes in report.
the result always refer to nothing-defined value and not the summation.

actually, our query is build on top of multiprovider.

and the formula is calculation from 2 RKF's which came from different cube.

it should be like:

formula 1 = RKF from cube 1 * RKF from cube 2.

formula 2 = CKF

formula 3 = formula 1 % formula 2.

we would like to have correct result in formula 3.

the issue should be in formula 1 because its where the nothing-defined value came from.

so I created new CKF based on formula 1 and use it to replace the formula 1.

also, I have check the result value from new CKF by using SUMCT to ensure that exception agg is work, but it does not. maybe exception aggregation doesnt work on RKF / KF from different cube? or my calculation was wrong? please help

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I need to check on the same.In the meantime can you share your report output.

Regards,

AL

Former Member
0 Kudos

Hi AL,

as we have complex formula and little time to implement this.

we're finally decide to use CL_RSR_WWW_MODIFY_TABLE.

and method DATA_CELL where I_S_SUM = 'X'.

it gives us the correct result in report.

thanks for your help anyway. I'm really appreciate it.

regards,

handoko

anshu_lilhori
Active Contributor
0 Kudos

Hi,

How did you do that can you just thorw some0 light on it.

It wil be informative for all of us to understand how this can be handled with the help of classes.

Regards,

AL0

Former Member
0 Kudos

Hi AL,

Of course

the main idea is to recalculate result row with class's method and
return the exact value to replace it.

to achieve this, you could try:
1. create Z class which inherit from CL_RSR_WWW_MODIFY_TABLE
2. re-defined method DATA_CELL with your requirement.
   this method applied in each cell in table data,
   so basically, you do not need set looping on record/cell again.
   - to get the result row type, you can refer to parameter I_IS_SUM.
   - to get the column position, you can use paramter I_X.
   - to get the value in cell, you can use method get_cell_info and importing e_s_cell_data-value.
   - to modify value in cell, you can use parameter C_CELL_CONTENT
3. if your done with the logic, just open the report and append the Z class.

    web item table => table properties => table interface class => set your Z class here

I believe there are more information regarding how to use above method in forum

Answers (0)