Wrong value in Result Row in a query which includes 1:N relationship SO/Inv
Dear all,
I have an InfoSet which includes sales order DSO, PO DSO and Invoice DSO. The purpose is to design a report to show 3rd party order flow.
Now I met an issue if one sales item contains multiple billing doc. Below is an example:
Sales doc: S001 order Qty is 600, there are two invoices for this order B001 invoice 200 and B002 invoice 400. Now in report we see below:
Sales Doc. -- Invoice no. --- Order Qty -- Invoice Qty
S001 ---B001 -
600 -
200
S002 ---B002 --- 600 -
400
Result Row -
1200 --- 600
We can see in Result Row totsl order qty is 1200 which is wrong.
I am wondering if anybody have such experience and the method soving this problem ? Many thanks in advance !
Hi,
Normal aggregation calculates the result row as a summation. However, you can change this default behaviour by using Exception aggregation at "Order Qty" key figure.
You can find a detailed article with examples about Exception aggregation at:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0b8ed5b-1025-2d10-b193-839cfdf7362a
I hope this helps you.
Regards,
Maximiliano
Similar Messages
-
Value from results row of the query
Hi Gurus,
My query gives me the following result.
Cost Cent Cost Elmnt Cost FTE Cost Per FTE
CC1 CE1 100 - 100
CC1 CE2 200 - 200
CC1 - - 5 0
Result 300 5 60
Now my question is can I capture the result of FTE (i.e., 5) and display it in first and second rows. Basically, I would like the output to be like:
Cost Cent Cost Elmnt Cost FTE Cost Per FTE
CC1 CE1 100 5 20
CC1 CE2 200 5 40
CC1 - - 5 0
Result 300 5 60
Regards,
RRGot it...Used SUMCT in another formula variable.
-
Result Row in the query output
Hi,
If I restrict a characteristic by hierarchy then I cant have the result row displayed. If the hierarchy active is removed then the result row gets displayed. All characteristics are marked to show the result row.
This characteristic is Account Number. If in the query definition I remove the restriction on account numbers and just select hierarchy active and the required hierarchy in the properties then I get the result row in the output. But now it also displays all the unassigned account numbers in a separate node Not Assigned Account Number (s).
I cant even restrict it in the output with hierarchy active selected. When I do select filter value in the output the options Include in Selection and exclude from Selection are grayed out and hence cant select it.
Please advice on this issue
Thank you,
samHi Jaya,
I think you misunderstood my issue.
My problem is not that i do not want to see the field. But instead, i do not want to see only the results row in the query output.
I need to have the results to populate a calculation via sumct formula.
My question is, can sumct be populated if i hide/supress RESULT row ?
Regards,
Maili -
Finding minimum value in each row using dynamic query
need to find the minimum and maximum value from each row using dynamic query
[from curr] will be given as input
TukyDECLARE @t TABLE(a INT,b INT,c INT);
INSERT @t VALUES(1,2,3),(9,8,7),(4,6,5);
SELECT *
, ( SELECT MAX(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MaxVal
, ( SELECT MIN(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MinVal
FROM @t;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Getting descrepency in the result row of the Query
Hi All,
I am executing a query which is having 4 Keyfigures and 2 formulas.
I am getting wrong result in the query for formulas.
Below is the query structure
f1 f2 f2%f1 f3 f4 f4%f3
date
1
2
792 408 51.78 9647 8403 88.57
All the keyfigures - result is set as total
Formula - result -nothing is defined(under calculation tab)
The result I am expecting for column 3 is 408/792 = 51.51
The result I am expecting for column 6 is 8403/9647=87.10
To get the expecte result what changes i need to do to the formula.
Thanks
JagadeeshHi Anand,
Thanks for your reply.
If i change it to summation, it will give me sum in the result row.
I am not looking for summation, i want percentage for (overall result F2/overall result F1).
Thanks
Jagadeesh -
Want to delete Rows from SAP Query which have u20180u2019 or blank values
Hi Experts,
I have made one sap-query, in that I have added some additional fields, after that I am getting some blank or u20180u2019 values in some rows, can anyone tell me how to delete those rows which have u20180u2019 or blank values.
Regards
Mahadev RoyHi mahadev
You must be fetching data from SQ02 in some internal table.Delete values from that internal table.
Also as you are fetching records from SQ02 then in the select statement you can put this condition of '0' and blank
so that you will get appropriate result.
Thanks
Khushboo -
Presenting/Selecting the "result rows" in a query
Hi,
Here is a description of my problem:
I have a query which returns values for materials grouped by purchasing groups:
Group 1 Material A KyeFigure
Group 1 Material B KyeFigure
Result: KyeFigure
Group 2 Material C KyeFigure
Group 2 Material D KyeFigure
Result: KyeFigure
I'm using a Web application designer chart to present the values graphically. I would like only to present the result rows in the chart, not item values. But since the chart picks all KFs presented in the table (items as well) this is not the case. I've tried to find a way in the chart-settings without any luck - it seems not possible. The documentation states that you're supposed to design your table the way you want it to show in the chart. However, I'm not allowed to redesign the cube or the report. It is not possible to drill up characteristics either (this affects the calculation).
My question is: Is there a way to extract the result rows into a new table and then base my chart on that one or simply somehow present only the result rows in a chart?
Best Regards
/DanielHi Daniel,
You can create the query view in BEx Analyzer. After you execute the query, use filters, drill downs etc to get to the exact "view" of data that you would like you chart to present. Save this query view. Then in your web template assign this query view as the data provider.
Hope this helps... -
How to suppress Result rows in a Query in Web Application Designer
Hi
I am trying to post a query in Web Application Designer. I am able to run the query in WAD but the Results rows appear. I choose Suppress Result Rows always in All Characteristics option in the query in BEx Explorer but still i see result rows in the WAD. Can anyone please let me know how to suppress Result rows so that they dont appear in Web Application Designer.
Thanks,
PadmaTo get the enhanced menu-
1. Open the template in WAD.
2. Go to Web Item properties.
3. Go to Entries in Context Menu.
4. Find the "Enhanced Menu" property. Set it to "display" if you want it to be visible in template result.
5. Next time when you execute your template you will be able to access it by right clicking.
or
If you just want to supress results without adding enhanced menu in the context menu, simply set "Calculate result as" to "No Display". -
Hi
I have sales org, channel, customer and material along with the key figures in the rows
of the query. I am automatically getting result for each level by default and then the
overall result. Is there a way in which i can change all the result rows with
the corresponding text they belong to like the material result, customer result etc.
Thanks
Rashmi.Hi
Not Sure, But try replacement path Variable (with Material Result...etc) and the ckf/Formula(total all the Material, channel...etc) for the same to appear the totals Row .
/people/kamaljeet.kharbanda/blog/2006/12/28/bex-characteristic-variable-with-replacement-path
Hope it helps and clear -
Result row problem in query.
Hi,
There is a hierarchy at the query level. When the report is run with disabling the hierarchy i am getting following output in result row =1 which is correct.
Column A
StoreA 1
DepartmentA 1
ClassA 1
Result row 1
When hierarchy drilldown is removed to one level i am getting different output which is 2.
Column A
StoreA 1
DepartmentA 1
Result row 2
Why i am getting different result row just by removing drilldown to a level? The setting Calculate result row as is put as "Sum".
Please help me to resolve this issue.
Thanks & Regards,
Virinchi.You have chosen a currency field which has multiple currencies ie 1000GBP and 2000 EUR - hence * for the total
Include the unit of currency in your query and supress result rows for the user - then you will get a total per currency code
Or of course you coudl nodim the result and add that up (ie in the exampel above you will get 3000
edit: sorry double post with Praveen above
Edited by: Simon Turnbull on Dec 30, 2008 2:10 PM -
Hi Gurus,
I am using five fields A, B, C, D and E (in the same order of appearance as columns from left to right of the report) and finally the Amount (based on a condition). I am getting a weird issue while executing a query. In my report, I wanted to have an additional row for "Result" for each of the above mentioned five fields.
There is no suppression of result rows (that is I have selected "never" for "Suppress Result Rows" for all characteristics/ fields).
I checked this several times and ensured that for each of the above mentioned fields, there is no suppression. I am getting "result" rows only for D and E columns (characteristics).
My question is: Apart from getting final result ("overall result" at the bottom of the report) how do I get a result rows for B and C also?
Thanks for the Help....Hi,
Are you running the report from the query or from the workbook? If you have changed the query and are stilll running the same workbook, sometimes these changes do not come through...Close the workbook and try to execute the query again. Does it still happen? -
Display only result rows in a query
Dear Friends,
I have a similar scenario than this (i copied it from another post in SDN):
Cal/Month---Cal/Date--
Revenue
Overall Result----
400
January-----Result--
400
01.01.2005----
100
01.02.2005----
200
03.02.2005----
500
I need it to be displayed as
Cal/Month---Cal/Date--
Revenue
Overall Result----
350
January-----Result--
400
February----Result--
300....
Is it possible?
Please advise,
XibiXibi,
Remove caldate from drilldown and always allow result rows for calmonth.
But then your aggregation seems funny.... you have 200 and 500 for Feb and show 300 in the desired result ??
Arun
Assign popints if helpful...
Message was edited by: Arun Varadarajan -
Not getting total of results row in bex query
Hi Experts,
In Bex I have created new formula variable which is the Percentage of On time delivery for a particular vendor. The problem is when I use calendar year and vendor in rows and CK in columns and execute the query, I am not getting the the total value of particular vendor percentage for the year. Instead I am getting the value of 'X'.
I tried to change the calculation result as "summation" but still I am facing the same issue.. If need more explanation i can give screenshots.
Please help.
Regards,
MathivananHi Anshu,
Thanks for your valuable reply. Here is the screenshots
The formula variable I have created is based on some CK's. When i run query for all vendors I am getting the result percentage. But when I run the query with calendar year I am getting result as below
The OTD Percentage is not the total % of the year 2010 for the particular supplier(vendor). -
Difference between values in 2 rows in SQL query
I have to find the difference between inventory onhand in the same store in week1 and week2.
I tried to do it in one "select" query something like :
SELECT store_id, ( suppose to be function that calculates difference) FROM my_table WHERE week=week1 or week=week2 GROUP BY store_id
however I have no idea how to find the difference between the valuues in two separate rows.
thanks in advance.If you have only two weeks in your data. This can work.
SQL> select * from emp
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7839 KING PRESIDENT 17-NOV-81 5000 10
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7900 JAMES CLERK 7698 03-DEC-81 950 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7369 SMITH CLERK 7902 17-DEC-80 800 20
7788 SCOTT ANALYST 7566 09-DEC-82 3000 20
7876 ADAMS CLERK 7788 12-JAN-83 1100 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
8888 KING PRESIDENT 17-NOV-81 7000 10
9999 ADAMS CLERK 7788 12-JAN-83 7000 20
16 rows selected.
SQL> select ename, max(sal) - min(sal) diff
2 from emp
3 group by ename
4 /
ENAME DIFF
ADAMS 5900
ALLEN 0
BLAKE 0
CLARK 0
FORD 0
JAMES 0
JONES 0
KING 2000
MARTIN 0
MILLER 0
SCOTT 0
SMITH 0
TURNER 0
WARD 0
14 rows selected.
SQL> Cheers
Sarma. -
Lowest value in CKF column in a query which uses structures.
Hi Experts:
I have the following user requirement.
There is a need to find the least value of the values in a calculated key figure in the columns
In rows I have structure and 6 structure elements. The structure elements are 0plant restricted with one plant each.
Plant / Period Spend / Period Volume / $/case / Best of Best
1000 / 1000 / 20 / 50 /20
2000 / 2000 / 100 /20/20
3000/ 3000/ 70 / 50 /43 /20
The column $/case is a calculated key figure and I need the best of best column to contain the lowest value of the $/Case column
This Best of Best column needs to be used in another calculated key figure.
Anyone who has solution will be awarded with SDN points.
NHello,
You can try out by creating a CKF and set the properties for that calculated keyfigure best of best with calculate single value as minimum and also result also minimum, then you can use this ckf in another ckf. if not going to be used globally you can try out by using formulas.
Maybe you are looking for
-
Can't get messages from my gmail account to my ipod touch to show up
Hello, My daughter's ipod touch does not allow her to receive her email messages from her gmail account on the ipod touch. What do I need to do to have this work. It was working before I updated my iphone to icloud. At the time our accounts were link
-
Smartforms - How to print an image in backgroud ?
Hello, I have to print some orders in development and quality system, so to avoid that some people can think that is a production order, I have to print also a big image in background (DEV for Development, QAS for Quality). Do you have some idea ? Ho
-
When I stop a movie, it doesn't go back to the main menu.
I am experiencing a very frustrating situation. I have burned a DVD with 2 short movies on it. When I play either of them all the way through, after they're over, it returns automatically to the main menu, which is what I want. However, when I STOP e
-
How to merge data returned from server after you hit SUBMIT button
I have a PDF form with blank ID field. When user click Submit button on the form, an ID will be generated from database on the server side. How do I merge this ID with client's original PDF from so he knows his ID number? Any help thanks.
-
I can't compile servlets, either
I am following the instruction of Java tutorial in "http://developer.java.sun.com/developer/onlineTraining/J2EE/Intro2/servlet/servlet.html". I copied the code for BonusCalculationServlet on my computer and tried to compile it but i couldn't. The err