Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 13, 2013 at 03:27 PM

    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-cbcb9db98a28?overridelayout=true

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0b8ed5b-1025-2d10-b193-839cfdf7362a?quicklink=index&overridelayout=true

    Hope this helps.

    Regards,

    AL

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Anshu Lilhori

      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 😊

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.