Calculate result in the query output
Hi,
Consider the case below:
Order Item SalesAgent Quantity Price
555 10 SA1 10 100
SA2 10 100
SA1 20 200
In this case the correct result is (Quantity = 30 (1020) & Price = 300 (100200))
This is as one item can have multiple Sales Agent but the price for each sales agent still reflects the total price for that item (same for quantity). So just to sum up gives the wrong result (100+100 is incorrect, total should be only 100).
If I use calculate result as last value then for the total order it takes only 100.
How can I set a result row for the above case such that it show result as 300. (Price and Quantity are KFs)
Thank you,
sam
Hi Sam,
Could you put the copied portion using the Code button while posting, so that its easy to understand.
Regards
Similar Messages
-
Showing Keyfigures error for result and overall result in the Query output
Hi All,
when executing query results show correct figures for qty & value but with ERROR instead of uom(Unit of Measurement) & currency;
Can anybody help?
Rgds,
C.V.Hi There,
Try checking that the particular UOM and currency u are reporting is loaded into BW or not.
hope it helps,
Regards,
Parth. -
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 -
Want to See Selected Input Variables in the query output
Hi al
My client gives a requirment like they want to see selected variables in the query output. Like suppose if i am entering Profit center, controlling area, version, caldayas a input on the screen. Now they want to see only Profit center and version on the query result.
Please let me know if any one has this solution.
Regards,
Amit ShetyeHi
Can you please give us user requirement and according to ure requirement so we given replies . If ure requirement please explain detail
But it is not neccessary that we can put something in free char and all. Inspite of that they wanted to select the input variable as per their requirement. They dont want to restrict them in Free char. -
Query result: reducing the query's line returned
I have the query output below:
SELECT null NRO_NEW, 123 NRO_OLD, 384603 OID_OLD, null OID_NEW FROM DUAL UNION ALL
SELECT null , 0143355014948714, 384611, null FROM DUAL UNION ALL
SELECT null , 0143356000159014, 385305, null FROM DUAL UNION ALL
SELECT 0143356000159014, null, null, 385305 FROM DUAL UNION ALL
SELECT 666 , null, null, 384603 FROM DUAL UNION ALL
SELECT 0143355014948714, null, null, 384611 FROM DUAL;
NRO_NEW NRO_OLD OID_OLD OID_NEW
123 384603
143355014948714 384611
143356000159014 385305
143356000159014 385305
666 384603
143355014948714 384611But I need to reach the result below( to put in the same line the NRO_NEW and NRO_OLD belong of the same OID_OLD and OID_NEW ):
NRO_NEW NRO_OLD OID_OLD OID_NEW
666 123 384603 384603
143355014948714 143355014948714 384611 384611
143356000159014 143356000159014 385305 385305Can anyone help me?
Edited by: user5914526 on Sep 15, 2011 1:30 PMmaybe this will help.
SQL> With t1 as
2 (SELECT null NRO_NEW, 123 NRO_OLD, 384603 OID_OLD, null OID_NEW FROM DUAL UNION ALL
3 SELECT null , 0143355014948714, 384611, null FROM DUAL UNION ALL
4 SELECT null , 0143356000159014, 385305, null FROM DUAL UNION ALL
5 SELECT 0143356000159014, null, null, 385305 FROM DUAL UNION ALL
6 SELECT 666 , null, null, 384603 FROM DUAL UNION ALL
7 SELECT 0143355014948714, null, null, 384611 FROM DUAL),
8 t2 as
9 (SELECT null NRO_NEW, 123 NRO_OLD, 384603 OID_OLD, null OID_NEW FROM DUAL UNION ALL
10 SELECT null , 0143355014948714, 384611, null FROM DUAL UNION ALL
11 SELECT null , 0143356000159014, 385305, null FROM DUAL UNION ALL
12 SELECT 0143356000159014, null, null, 385305 FROM DUAL UNION ALL
13 SELECT 666 , null, null, 384603 FROM DUAL UNION ALL
14 SELECT 0143355014948714, null, null, 384611 FROM DUAL)
15 select t2.nro_new,
16 t1.nro_old,
17 t1.oid_old,
18 t2.oid_new
19 from t1, t2
20 where t1.oid_old = t2.oid_new
21 order by t2.nro_new;
NRO_NEW NRO_OLD OID_OLD OID_NEW
666 123 384603 384603
143355014948714 143355014948714 384611 384611
143356000159014 143356000159014 385305 385305
SQL> -
Anyway to supress the coulmn names in the query output from SQLPLUS
Hi,
I am using sqlplus to run a script which returns the results with column names.
Is there anyway to omit the column names from the query output from sqlplus?
I would like to have only results with out their column names in the output.
Thanks in advance!!Hi,
Maybe your LINES(IZE) isn't set ?
SCOTT>set lines 130
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>As an alternative to setting linesize, you can format columns:
SCOTT>set lines 80
SCOTT>col status for a8
SCOTT>col machine for a30
SCOTT>col module for a30
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>Regards
Peter -
Result of the query is not filtered as value given in Select Option variabl
Hello ,
A Select option Variable is created on Navigational Attribute( ZINV_PROG) of 0WBS_ELEMT.
The Compound Key for object ZINV_PROG(Investment program) is APPR_YEAR( Approval Year)
This ZINV_PROG object does not bear Master data.
The values in the field get populated as you load Master data of 0WBS_ELEMT.
The values for this objects is as shown below:
APPR_YEAR ZINVPROG
2005 ESCCCAPS
2007 ESCCCAPS
2008 FIRE
2006 CAPITAL
A select option variable is craeted on this Navigational attribute.
When you execute the query , On the selection screen of the query..
If you provide i/p for Investment programm field as 2007 ESCCCAPS, the data should ideally be filtered for this values only.
But the result of the query shows data for both values 2005 ESCCCAPS and as well as for 2007ESCCCAPS.
Let me know how to sort this issue.
Points will be assigned for the correct and helpfull answere.
Thanks,Thanks Srini for your prompt explanation.
My Question is if Approval year is a compounded key of ZINV_PROG object why data would not get filter out directly.
I mean on the screen for this particualr variable i take help - F4 to see values there you are able to see all the values of Investment programm along with the apprroval year.
If i select value as 2005 ESCCCAPS from the help F4 screen then ideally data should be fileterd out for this particular value. But it is not happening so.
Is that so in Query desgining that if you creating a variable on Nav Attribute, and that particular Nav attribute has a compound key then if you want to filter out the data for this Nav attribute correctly you would also require to create a variable for Compound key also.
Please let me know
Thanks -
Hi All,
i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
basically query is checking the rows count from couple of user tables in servers.
issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
could you please suggest how can i achieve this?Copy to what?
SELECT COUNT(*) FROM sys.objects
Running the above statement returns two columns (server name and count)
All the servers SS2005 and onwards , then use
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'name',
@recipients = '[email protected]',
@query = 'SELECT COUNT(*) FROM sys.objects',
@subject = 'Count rows'
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 -
ERROR displaying in the query output... urgetn
hi experts,
For the amount keyfigures in the query output it displaying ERROR after the amount like ex- 2000 ERROR.
plz let me know how to rectify this..
regards
vadlamudihi,
i have created only two keyfigures EMP_BASIC and EMP_HRA. and in the transformations i have mapped with 0DOC_CURRCY.
but in the report its showing ERROR only after the amount. plz tell me exactly with what field i need to map???
regards
vadlamudi -
How to get the Query output to Excel
Hi ,
Can you tell me how to get the Query output to excel with out using any third party tool?
Can you tell me how to write the code in Webservice and call it..
Please explain it Elaboartly..
Thanks in Advance!!!
Miniwhats your source system?
you can use Live office, or query as a webservice if you are getting data from universe
if you're getting data from SAP BI query and you have a java stack on your netweaver then you can get the data directly using sap bi connector in xcelsius.
good luck -
How to display header title for 0MATERIAL texts in the query output?
Dear Bwers,
I have a requirement where i need to display headers titles for 0MATERIAL texts in the query output. (example "Material description"). Any ideas on how to do this?
Thanks
RajKamal,
Its is as below:
<b>Vendor</b> <b>Vendor Name</b>
1001 --- Bright Industries
1002 --- Glow Industries
I want to display the header title "Vendor Name" as the title in the column instead of displaying the text without any header title.
Thanks
Raj
Message was edited by:
Raj Singh
Message was edited by:
Raj Singh -
Suppress zero rows in the query output.
Dear Experts,
We executed a query. In the output the values are displayed based on a hierarchy on gl account.
But in the output some rows dont have any values i.e 0 value. Still those rows are appearing in the report output.I want to
supress entire row. How to supress the entire row if no value i.e zeros are appearing in the query output.
Regards,
Bhadri M.go to change mode of query
in that set the query properties /go to the query property secreen
in the "Display " tab set the supperssion as "active (all value=0)" and in structure properties select the check box "also use zero suppression for strucure element"
i think it will be help ful
Edited by: Soma Venkateshwarlu on Aug 28, 2009 2:40 PM -
How to replace # in the query output ?
Hi experts,
In the query output and for a particular field in a record if there is no value then it is displaying as '#'.
Can we replace '#' with any text or with any other value ?
Regards,
Nishuv V.hello,
if you display the characteristics as Key u will get as '#'.
You can select as Text,then it will show 'Not Assigned'.
Further, check on these threads:
How to replace '#' with blank when there is no value for a date field
Re: How to replace display attribute Value '0', instead of '#' in the query
Reg,
Dhanya -
Issue with Saving the Query output data in Excel format
Hi,
Recnetly we had upgraded from 4.6c to ECC 6.0.
In ECc 6.0 environment, when user try to export the query output , we are getting only XML option to save the data.
But user want to save the data in EXcel format, he was able to do that in 4.6C.
pleas eprovide some inputs, on this issue.
Thanks,
Sanketh.I cannot for the life of me imagine, why a link to a post in the 'Business One Forum' where one uses ODBC to transfer query-data to MicroSoft Excel is of relevance to the OPs question, even if the same is not a security issue.
Never mind. [note 40155|https://service.sap.com/sap/support/notes/402155] deals with various symptoms in the ALV-Excel combination as as of release 4.6C. There are various others, mostly in components BC-SRV-ALV and BC-ABA-LI - also: I remember that when we upgraded from 4.5B to 4.7C there was an issue with Excel-templates -> the solution was in the release notes somewhere. So, in addition to SMP you might want to check the release notes and/or upgrade guide for solutions.
And yes, moderators ... this is not a security issue, this should go to ECC-Applications/Upgrade. -
Supress the "Overall Result" in the Query
Hi,
Is there a way of supressing the overall result in the query? I do know that i can supress results by characteristics, but I would like to supress the results on a query level.
ThanksHi Davy,
Select all the characteristics and supress the result for all of them.
Regards,
Diego
Maybe you are looking for
-
Reading XML file from specific location&Storing xmldata into related tables
I am new to xml. My requirement is, 1) Get the xml file from specified location (C:\xmlfiles\ xmldata.xml) 2)Convert xml data in clob data. 3)store the data into related table. and vice-versa. What i did, a) I got the data from related tables and con
-
ITunes freezing when trying to sync iPhone 5.
I'm at my tethers end. Last month I had my iPhone replaced at an Apple store, as the battery on my old phone was draining unusually fast (100% to 0% in 2 hours on standby with nothing open). This replaced iPhone has been slightly tempermental, but I
-
Hello everyone, my problem is the following: i was installing windows with bootcamp, after some time trying to boot, the mini showed me a flashing apple logo and an access denied symbol, i shutted the mini down after two hours on the boot screen, i w
-
Tumblr breaks advanced font settings in Firefox, all Win and Mac versions
tumblr.com and tumblr.com/dashboard do not support, or break, the ability to choose your own fonts in Firefox. The problem affects Firefox 12-14 on Windows OS, and may also affect Firefox for the Mac. The problem: unchecking the option "allow pages t
-
10.4.9 and sleep
After installing 10.4.9 my iMac (Intel) wiil not go to sleep when I have a program running (fx Safari). I have tried the Combo and the web update. Any solution ?