cancel
Showing results for 
Search instead for 
Did you mean: 

Query Design

Former Member
0 Kudos

Dear All,

I have a requirement where I have to calculate the Sales amount for each material and then divide this amount by the total sales amount.

Now the total sales amount depends on the selection criterion and is not fixed. So my question is how would I find out amt / sum (amt) when neither the position of the total (the result row) can keep on changing and so can the position of the amt column, depending on the user drill down/across selection.

Any inputs would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member188975
Active Contributor
0 Kudos

Hi,

You can create a formula by using a function called SUMGT. This function always returns the amount on the result row and changes according to drilldowns and filters.

Hope this helps...

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try using SUMCT and other similar mathematical operations.

Which will give you a toal on every row in a column using which you can carry out all your calculations..

Ashish

Former Member
0 Kudos

You can use the SUMCT (result), SUMGT (Overall Result),

SUMRT (Query Result) functions for getting the values dynamically. See documentation.

http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm