Duplication of data from an query output ( SQ01)
Hi Gurus,
After executing the query (SQ01) the output is working fine, But the user does not want to see the duplication of the same data in the report.
Present Report shows like this
Customer Document No.
1234 90001
1234 90002
1234 90003
But the user wants like this
Customer Document No.
1234 90001
Blank 90002
Blank 90003
And the output of the report is very big, can we freeze at some column like we do in excel.
I will assign points.
Thanks for your help
Prashanth
Hi Sridhar,
Thanks for your reply. Can you please let me know to how to do to a query not to the output. As the user wants to see the output in that layout.
Thanks for your help.
I will assign points.
Thanks
Prashanth
Similar Messages
-
Transfer Data from a Query to DSO
Hello,
I have an APD to transfer data from a query to a 'Direct update DSO'. The execution of this APD times out since the volume of query data is very high.
Is there an alternate way of transfering data from a query to DSO?
Please suggest.
Thanks!One way would be to extract the data from the existing cube using a function module that would mimic the query level filters and restrictions. That data can be populated into the new cube.
I wud suggest u take the data from a non-aggregated layer (say a DSO below the cube).
Also, check for the possibility of running the APD in multiple runs by using some kind of selection that would sum up to give u the whole data required.
Can u confirm if ur query itself is getting timed out?
-PA1 -
Bapi to get data from BW query
Hi,
Does anyone familiar with bapi function to get data from BW query .???
I'm trying to use RS_VC_GET_QUERY_VIEW_DATA_FLAT but i get only the SUM rows of the query
and not the details rows (drill down).
i want to export the data of BW query to table and i need all the query data.
if someone have an example or documention its will be great.
Thanks.Hi,
Does anyone familiar with bapi function to get data from BW query .???
I'm trying to use RS_VC_GET_QUERY_VIEW_DATA_FLAT but i get only the SUM rows of the query
and not the details rows (drill down).
i want to export the data of BW query to table and i need all the query data.
if someone have an example or documention its will be great.
Thanks. -
Hide/Delete lines from ABAP Query output when Quantity is 0
Hi all,
I'm changing an existing abap query. My requirement is to delete the rows from the report output where qantity = 0.
I tried the following ways.
1. In SQ01, select the quantity field and check the checkbox for "Display only field <> 0", but this didnt worked as it will
supress the zero from display.
2. I tried to write code in the Infoset SQ02->Edit->Code. I wrote the following code "CHECK vbep-wmeng IS NOT INITIAL".
Here the problem is, the code is not executing in the test client. When I open the Infoset in test(i mean development test)
client the code is there, but when i execute the program its not working. I tried using "BREAK-POINT", program executions
does not stop at the break point. There is existing code in the event "START-OF-SELECTION", this code I'm able to see in the
query program opened through SE38. I edited the existing code and kept a break point in between, and now checked in the
program in SE38, but the changes are not reflected. I'm able to see old code only(even after save n generate).
3. Gave search in SCN, google etc.
Please note.
1. I'm not using any Logical Database in the Infoset. Its a simple join of 4 tables.
2. Query is created in the Global Area (cross client) not client specific.
Can anybody tell me what could be the problem and how can Over the above issues and achive the requirement.
Thanks in advance.
Edited by: Mr A on Feb 25, 2010 1:39 AMDear Mr A,
Can i know how did u solve the issue even i'm facing the same problem.
Regards,
Karan Bhasin -
Building a table with data from a query
Hello group,
Is it possible to build a table with the output from a query. We would like to build queries on precalculated data, and want to use other queries for the precalculation.
Regards, Léon HoeneveldHi Léon,
use transaction RSANWB.
It should be available from 3.0.
regards
Siggi
Message was edited by: Siegfried Szameitat -
Get data from bw query to r/3
Hi,
There is a query defined in BW with some variables. The current process is user is executing the query with necessary variables and the query result output is saving as csv file and this file is used in r3 to update the data in r3.
Now we have to make this process automate. We have to get the query result data from BW to R3.
We have a constraint of not using the Open hub method in BW.
Is there any function module or any standard program to get the query result data from BW to r3.
Any help is highly appreicated.able to resolve the issue..
creating trusting RFC connection solved the problem -
Regarding fetching the data from Tcode FBL3N output list.
Hi experts,
I want to get the data from the FBL3N Transaction output to into my program by giving Company code G/L account number and Fiscal year as input to FBL3N tcode.
Please guide me how to approach it its urgent.Hi Naveen,
SUBMIT stdreport EXPORTING LIST TO MEMORY
AND RETURN.
With the above statement you can export the list out put and
by using the below function module in the your program,
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
Regards,
Madhu. -
No data from BW-Query in BO-tools
Hello all
On a newly installed BO XI 3.1 with the SAP integration kit I cannot get data from my existing BW queries.
For example, if I start Xcelsius and add my BW-system as connection I can get the structure of the query (headings) but no data is displayed, neither in the connection's preview tab nor in the web preview.
The same happens if I create a QaaWS on this BW-query - I see the query headings, but not the actual data.
The query shows data if I open it directly in my web browser and it's a really simple one: no variables, no extras, only a few columns and rows.
I use SAP BW 7.01 SP6, XI 3.1 12.3.3 and XCelsius 2008 5.3.4
In SAP BW my user has SAP_ALL as well as BOE Admin & Content producer roles.
I'm relatively new to BO products so I have no idea where to start looking for the cause. Please help!
BR
KananHi
After I found the document "Using Xcelsius 2008 with SAP NetWeaver BW" (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10ad2489-8956-2d10-f8ab-ed4cce2766da?quicklink=index&overridelayout=true) and followed the steps it works.
It seems as if the error was not in the system but in front of it - a typical case of RTFM, although the manuals are not always easy to find.
sorry & thanks.
BR
Kanan -
Need to return data from a query in different ways - Please help
We are using 10g R2
I have a proc as follows that has a query with over 100 values in the select clause:
proc one( input param1, input_param2,.... output_cursor )
as
begin
open cursor for
select ...about 100 values with most of them being calculated
from table1, view 1, table2, table 3, view 2 ...
where ....
and table1.col1 = input param1
and table1.col2 = input param 2
and view1.col5 = input param5...
end;
I need to return the data that comes from the above query in different formats, columns for a report would be different from columns for screen A and different for screen B. I need only certain columns for a report and different set of columns for another screen. I have wrapper procs that get different input params. From the wrapper procs I intend to call the above proc but would like only selected values.
How can I accomplish this? Since my main goal is to select different columns for each wrapper I was thinking of insert the data from the above proc into global temp table and selecting whatever columns and order I want from the wrappers.
What do you think? Any other solutions?
Thanks
Edited by: user565033 on Jan 21, 2013 7:50 PMYou need to clearly separate roles and responsibilities. The PL/SQL code that creates and supplies a cursor handle is server code tasked to supply data. The code that makes the call for server data, is responsible for formatting and rendering that data.
Thus moving data formatting into the server code needs to be question. Simple example. Cursor does not return invoice date as a date - but formats it into a string using TO_CHAR().
This works for client1 - as that is the date format expected. However, client2 has different International settings and specifies a different date format. Invoice date, formatted into a string by the server, now renders in the wrong format on client2.
Server code should not be concerned with rendering and formatting of data send to a client.
As for the idea to use a global temp table is ..., well to put it nicely, it smells. Badly.
The single most expensive operation on a database platform is I/O. And now you want to read server data and write it to temporary storage, and the read data from temporary storage to return to the client? What on earth for!? Why purposefully increase the size of the I/O workload? Why decrease performance and undermine scalability?
Provide a proper abstraction interface to the client. Enable it to specify (as simplistically as possible) what it wants ito data. There are a number of ways to design and implement this in PL/SQL. Simplistic example:
SQL> create or replace package Employees as
2
3 EMP_FULL_DETAILS constant integer := 1;
4 EMP_BASIC_DETAILS constant integer := 2;
5
6 procedure GetEmpByID(
7 cur out sys_refcursor,
8 empID in emp.empno%type,
9 template in integer default EMP_BASIC_DETAILS
10 );
11
12 procedure GetEmpByName(
13 cur out sys_refcursor,
14 empName in emp.ename%type,
15 template in integer default EMP_BASIC_DETAILS
16 );
17 end;
18 /
Package created.
SQL>
SQL> create or replace package body Employees as
2
3 type TArray is table of varchar2(32767);
4
5 TemplateList constant TArray :=
6 new TArray(
7 'EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO ',
8 'EMPNO, ENAME, JOB '
9 );
10
11 procedure GetEmpByID(
12 cur out sys_refcursor,
13 empID in emp.empno%type,
14 template in integer default EMP_BASIC_DETAILS
15 ) is
16 sqlSelect varchar2(32767);
17 begin
18 sqlSelect :=
19 'select '||TemplateList(template)||
20 'from emp where empno = :empID';
21
22 open cur for sqlSelect using empID;
23 end;
24
25 procedure GetEmpByName(
26 cur out sys_refcursor,
27 empName in emp.ename%type,
28 template in integer default EMP_BASIC_DETAILS
29 ) is
30 sqlSelect varchar2(32767);
31 begin
32 sqlSelect :=
33 'select '||TemplateList(template)||
34 'from emp where ename like :empName';
35 open cur for sqlSelect using empName;
36 end;
37
38
39 end;
40 /
Package body created.
SQL>
SQL> var c refcursor
SQL>
SQL> exec Employees.GetEmpByID( :c, 7499 );
PL/SQL procedure successfully completed.
SQL> print c
EMPNO ENAME JOB
7499 ALLEN SALESMAN
SQL>
SQL> exec Employees.GetEmpByName( :c, 'A%', Employees.EMP_FULL_DETAILS );
PL/SQL procedure successfully completed.
SQL> print c
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7499 ALLEN SALESMAN 7698 1981/02/20 00:00:00 1600 300 30
7876 ADAMS CLERK 7788 1987/05/23 00:00:00 1100 20
SQL> -
Facing prolem in Dashboard 4.1, while fetching data from Bex Query
Hi Exports,
I am facing an error message " Failed to (de-)serialise data. (Xsl 000004)" while fetching data in Dashboard from Bex Query.
The query is getting connect. while drag n drop some dimensions and measures then going for Refesh or Run Query, geting this error.
The same query is working fine with other comp like webi n crystal.
Anybody having solution for this please let me know. I am stuck somewhere.
Thank YouHi,
Check the data in the infoProvider.Reduce the Bex query Characteristics & Key figure fields.Try to identify due to which characteristsic adding in Bex Query ,are you facing the issue.Check that characteristic data in the infoProvider.
Regards,
Venkat -
I'm looking for a link to sample code to fetch a record from BW query by passing PO NUMBER as parameter and then putting results into ADO Dataset. I'm trying to avoid using MDX Queries. Maybe someone else has asked this question?
Regards,
jhcIIIDear
there are many factors that can play in this, starting from proper Sizing, proper tuning of APS and WPS servers to configuration of Java app server used, network between BI servers and data sources and even report design.
This sort of question have been asked before in this forums, there are also SAP KB articles on sizing, performance and other areas that are part of this question.
I'd start here :
https://service.sap.com/sap/support/notes/0001570271
https://service.sap.com/sap/support/notes/0001694041
https://service.sap.com/sap/support/notes/0001522418
http://scn.sap.com/community/coil/blog/2012/06/12/best-practices-for-running-bi-4-in-virtualized-environment--guidances-from-coil-projects
http://scn.sap.com/docs/DOC-6191
http://scn.sap.com/people/james.rapp/blog/2012/07/03/bi4-pattern-books-are-now-live
Regards -
How to get data from other programs output?
Hi gurus,
I have told to do the following can you please help me out.
In SM35 created many batch no. The user would like to know automatically when the session is not ok (error status).
In return of the first program RSBDCBTC_SUB we will get the queues ie QID and QSTATE.
I have told to create new Z-prog.
In that Z-prog how can i get list of QID from the result (Output) of the first prog(RSBDCBTC_SUB )?
How i get that particular QIDs in my Z-prog?
Thanks in advanced.Hi
Senthis,
You can use IMPORT and EXPORT or SET and GET
IF you take the F1 help on these KEY words it will take you to the KEY word documentation where you can find an example
of Go to TCode ABAPDOCU
where you can find an example for the same
Regards
Ramchander Rao.K -
Hoping there is a SQL guru out there that can help me with this
I have two tables that I want to pull data from and display a report, based on a particular date range, for this example let's say 08/01/2011 to 08/31/2011
In one table there would be an affiliate ID - AFF_UID and also the date and a counter for that date, IMP_COUNTER , now there may only be a few records not every day might be covered, say
TABLE IMP
date,aff_uid,imp_counter
08/01/2011,999,2000
08/02/2011,999,2050
08/20/2011,999,2030
etc
I then have another date, similar set up only there are multiple records in here for a single day, again not all days covered, I would need to total up each row for each day to get a count. So it might be:
TABLE LEAD
date,aff_uid
08/01/2011,999
08/01/2011,999
08/01/2011,999
08/01/2011,999
08/12/2011,999
So we have different dates covered, sometimes the same date, I need the counter from the first table, and from the second table I need to add them up for a total, and then display any date that has a value and put both counter and lead count together
Result from above
date,imp total,lead total
08/01/2011,2000,4
08/02/2011,2050,0
08/12,2011,0,1
08/20/2011,2030,0
I am sure there must be a SQL command that can gel all of this together with some grouping? Last thing I need is a ton of SQL statements in a loop!
My alternative is to add a counter to the IMP table for each lead, so every time I update the lead table with a record, I will also update the counter, but that's unncessary storage of data I already have an an extra update statement that I might be able to do without, but maybe it would make generating reports faster, just pulling to counters with no 'addition' required.
Appreciate any feedback
Thanks
MarkWell I thought that I had this one up and running, but once it went into production I found that it didn't give the desired results.
I have an account that has 3 'tracking'/aff accounts, so what it's doing is giving out 3 lines for each date rather than join them together into one. The values are also incorrect, I'm still trying to figure out just where it's even getting those numbers, I manually added up the numbers in the dbase and it didn't match
Here's the command
<CFQUERY name="GetStats" DATASOURCE="#datasource#">
SELECT
COALESCE(IMP.imp_date, LEAD.lead_date) AS report_date
, COALESCE(IMP.imp_counter,0) AS imp_counter
, COALESCE(LEAD.lead_count,0) AS lead_count
, COALESCE(LEAD.lead_aff_payment,0) AS lead_aff_payment
FROM
SELECT
imp_date
, imp_counter
FROM impressions
WHERE imp_date BETWEEN #createODBCdate(form_from)# AND #createODBCdate(form_to)#
<CFIF #val(ListGetAt(form_aff_UID,1))# IS "3">
AND imp_aff_uid IN (SELECT aff_uid FROM aff WHERE aff_master_uid = #session.aff_uid#)
<CFELSEIF #val(ListGetAt(form_aff_UID,1))# IS "2">
AND imp_aff_uid = #val(ListGetAt(form_aff_UID,2))#
<CFELSE>
AND imp_aff_uid IN (SELECT aff_uid FROM aff WHERE aff_sub_uid = #val(ListGetAt(form_aff_uid,2))# AND aff_master_uid = #session.aff_uid#)
</CFIF>
) AS IMP
FULL OUTER JOIN
SELECT
lead_date, COUNT(*) AS lead_count, SUM(lead_aff_payment) AS lead_aff_payment
FROM leads
WHERE lead_date BETWEEN #createODBCdate(form_from)# AND #createODBCdate(form_to)#
AND lead_data_status = 1
<CFIF #val(ListGetAt(form_aff_UID,1))# IS "3">
AND lead_aff_uid IN (SELECT aff_uid FROM aff WHERE aff_master_uid = #session.aff_uid#)
<CFELSEIF #ListGetAt(form_aff_UID,1)# IS "2">
AND lead_aff_uid = #val(ListGetAt(form_aff_uid,2))#
<CFELSE>
AND lead_aff_uid IN (SELECT aff_uid FROM aff WHERE aff_sub_uid = #val(ListGetAt(form_aff_uid,2))# AND aff_master_uid = #session.aff_uid#)
</CFIF>
GROUP BY lead_date
) AS LEAD
ON ( IMP.imp_date = LEAD.lead_date )
ORDER BY report_date;
</CFQUERY>
and here are the results
TRAFFIC REPORT: 01/01/2012 - 01/21/2012
All Accounts
Date
Offers
Served
Total
Leads
Revenue
01/19/2012
249
1
$0.38
01/19/2012
11
1
$0.38
01/19/2012
30
1
$0.38
01/20/2012
1,006
7
$2.66
01/20/2012
40
7
$2.66
01/20/2012
1,090
7
$2.66
01/21/2012
582
6
$2.28
01/21/2012
33
6
$2.28
01/21/2012
515
6
$2.28
Total
3,556
42
Sub-Total
$15.96
Referral Revenue
$0.00
Total
$15.96
$15.96 is NOT correct, I need to find out whats going on there, but the other issue is look how it's duplicating the dates, it's one line for each account by the look of it
Can anybody help! This SQL command already got a little beyond me
Thanks
Mark -
How to send email alert to users from the query output ?
Hi all,
I intend to write a pl/sql to send email alert to user based on the following query output :-
Item_______Qty_on_hand________Min_qty______email
[email protected]
[email protected]
[email protected]
once run, I will like to distribute to those email id. How should I code that in pl/sql ? or any other better idea is welcome. Thanks.
Rgds
Limhttp://asktom.oracle.com/pls/ask/f?p=4950:8:3439330610438686683::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:255615160805,
-
How to refresh report data from bex query (BW) with parameters
Hello,
i hope someone can help me with my problem. I developed an desktop application, which loads (actual state) a report from the local file system. After setting the parameters, the report should be saved as a pdf file. Loading the report into the ReportDocument object and exporting the report to a pdf works fine. Setting parameters (without) a data source too. But now i can't refresh the data in the reports given by a parameter (e.g. time).
I know there are two methods to do this. Push and pull. I want to use the pull method, cause my program should exports different reports and i think it should be easier to handle this with this method.
On my development environment is installed:
Crystal Reports SP 4
MS Visual Studio 2010 (coding with C# .NET)
.NET Framework 4
SAP Integration Kit
Crystal Reports for Visual Studio 2010 SP1 - SDK libraries
Crystal Reports for Visual Studio 2010 SP1 - Runtime 32 bit
SAP GUI 7.20 (Compilation 3)
The bex query is enabled for external use from ole db for olap. Do i have forget something else?
Here is a part of my code:
public ReportDocument doPullMethod(ReportDocument crReportDocument)
TableLogOnInfo crTableLogOnInfo = crReportDocument.Database.Tables[0].LogOnInfo;
ConnectionInfo crConnectionInfo = crTableLogOnInfo.ConnectionInfo;
crConnectionInfo.Password = "*******";
crReportDocument.SetDatabaseLogon(crConnectionInfo.UserID, crConnectionInfo.Password, crConnectionInfo.ServerName, crConnectionInfo.DatabaseName);
MessageBox.Show(crConnectionInfo.UserID + " _ " + crConnectionInfo.Password + " _ " + crConnectionInfo.ServerName + " _ " + crConnectionInfo.DatabaseName);
for (int i = 0; i < crReportDocument.Database.Tables.Count; i++)
// crReportDocument.Database.Tables<i>.ApplyLogOnInfo(crTableLogOnInfo);
MessageBox.Show("TestConnectivity: " + crReportDocument.Database.Tables<i>.TestConnectivity());
return crReportDocument;
Cause i'm using only one bex query, i know that the SetDatabaseLogon()-method should bring me the same result as the ApplyLogOnInfo()-method SAP Crystal Reports .NET API Guide
Exists an order which i have to follow? First setting parameter and then set the login informations or backwards? Cause i also get the "Failed to load database information" exception, when i set a parameter and TestConnectivity() returns false.
Do i have to activate the data refresh manually or will be the data refreshed automatically on export?
I searched in this forum (.NET - SAP Crystal Reports) and found only this thread which according to my problem:
[Re: Crystal report connects to BW RFC by .NET;
The question is assumed answered.Hi Robin,
There is a SAP Integration Kit you need to allow CR to connect to SAP data sources. There isn't one for CR for VS 2010 and I don't believe there are the various extra options available in the SDK, no SDK access to the DB driver.
Possibly, Check the other post, download and run the app Ludek suggested, it will get the connection info for your report using RAS and then plug the output code into your code and see if that works. It should show the crdb_olap dll is the database driver, assuming that is the connection method you used when designing the report.
Pay attention to the database dll in the output from that app and verify it is on your PC in: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
If that doesn't work then.....
The problem is, CR for VS 2010 ( version 13 ) is the runtime for BOE 4.0 ( version 14 ) which includes the Integration kit drivers on install. There is no standalone install of the database drivers. They are installed with CR 2011, which doesn't have a SDK included, CR for VS 2010 is also the Developer version for CR 2011.
Because of the "custom" connection requirements there is no SDK or access to the BW datasource extra options....
Also note that CR 2008 is not supported in VS 2010, it should work though as long as you stick to 2.0 -> 3.5 framework, no 4.0 Framework support in CR 2008 or BOE 4.0
You may want to try the SAP Integration Kit forum to see if anyone has been able to make this work or contact your account manager to verify if there are any plans to do what you are doing....
Don
Maybe you are looking for
-
How do we move i tunes content from a windows computer to our new macbook pro
how do we move i tunes content from a windows computer to our new macbook pro
-
my daughters new ipad is disabled. how do i fix this?
-
Weblogic 10.3 JNDI with SQL Server
Hi Friends, I am working on a project which requires connection with MS SQL Server. I created a data source using weblogic admin console, and used "BEA's MS SQL Server Driver(Type 4) Version:7.0,2000,2005",( I selected one phase commit),and I am able
-
Wrong tax calculation for minimum sales order scenario
Hi all! We are trying to use minimum sales order value for our sales order processing in CRM. The sales order value and the calculated tax looks fine when the sales order is created. Eg. Quantity = 10 PR00 $4 each Total value of $40 AMIW $50 AM
-
I need to return multiple values in function
create or replace function f (p in varchar2) return varchar2 is a number(10); begin for loop 1 in 1..10 select instr('yyyyyyyyynnnnnyynny','y',1,i) into a from dual; end loop; return a; end; my function return a value but i need to return multiple va