FM to read multiple queries

Hi Guys,
I want to read output of multiple BI queries and show the data in ABAP report. I am looking for any Function module which I can use for this purpose.
Please reply
Regards
Santosh

Hi Santosch,
your request is a bit unspecific. If I want to collect data from different queries to create a new infoprovider, I would use Analysis Process Designer (APD, TA: RSANWB) and use the queries as data provider.
But I am not sure this is what you want to achieve ?
Kind regards,
Jürgen Kirsch

Similar Messages

  • Multiple Queries in Workbook - Refresh Screen Shows Up for Every Query

    We have multiple queries in a workbook.  All of these queries have the exact same selections for the variable selection screen.  When all the queries are refreshed once, the selection screen used to show up once and all the queries are refreshed with the same selections.  
    We were on BI 7.0 and SP10.  We recently moved to SP12.  Since the SP12 installation, the multiple query refresh pops-up the selection screen for every query.  It is nothing like "multiple query refresh" at once since the user has to click "execute" button for every single query.  It is interesting to note that the selection screen only contains hierarchy variables and hierarchy node variables.  The other variables of selection screen do not show up.  I couldn't find any OSS note on this topic.  Please let me know if anyone has any comments on this issue.  I will assign points to useful posts.

    hi Sameer,
    try to update front end patch to latest version ?
    Using the BI 7.x Add-On for SAP GUI 7.10 - Requirements
    hope this helps.

  • How to execute multiple queries in one stored procedure.

    Hi,
    I am Kumar,
    How to execute multiple queries in one stored procedure.
    here is the my requirements,
    1. get the max value from one table and sum of the that value.
    2. insert the values and also sum of the max value.
    using stored procedure
    I am using SQL server 2000 database.
    Please help me.
    Advance thanks
    by,
    Kumar

    This is not a java question and it is not even a problem: your only problem is
    1) lack of knowledge
    2) lack of interest to find a manual
    But you are going to have to change both by actually reading a book or a manual that explains the stored procedure language of SQL Server. It is the same as Sybase I think, so you could also look for a manual for that DBMS.

  • Multiple queries with 1 connection

    Can I execute multiple queries with one connection?
    //Example -
    <%
    String firstconn;
    Class.forName("org.gjt.mm.mysql.Driver");
    // create connection string
    firstconn = "jdbc:mysql://localhost/profile?user=mark&password=mstringham";
    // pass database parameters to JDBC driver
    Connection aConn = DriverManager.getConnection(firstconn);
    // query statement
    Statement firstSQLStatement = aConn.createStatement();
    String firstquery = "UPDATE auth_users SET last_log='" + rightnow + "'WHERE name='" + username + "' ";
    // get result code
    int firstSQLStatus = firstSQLStatement.executeUpdate(firstquery);
    // close connection
    firstSQLStatement.close();
    %>     
    Now, instead of building a new connection for each query, can I use the same connection info for another query?
    if so - how do you do this?
    thanks for any help.
    Mark

    Create multiple statement objects from your connection. It's a good idea to close these in a finally block after you're done with them
    Connection conn = null;
    Statement stmt1 = null;
    Statement stmt2 = null;
    try {
        conn = DriverManager.getConnection();
        stmt1 = conn.createStatement();
        // some sql here
        stmt2 = conn.createStatement();
        // some more sql here
    } finally {
        if ( stmt1 != null ) stmt1.close();
        if ( stmt2 != null ) stmt2.close();

  • Multiple queries in a single report?

    I'm having some issues with the ColdFusion Report Builder...
    I have a database table called "Items" that includes fields
    for Reviewer and Status. I want to create a report that will list a
    reviewer, then express the number of items where the Status is
    "open" as a total or record count. I want to do the same for total
    items, and then express the number of "open" items as a percentage.
    For example:
    REVIEWER, OPEN ITEMS, TOTAL ITEMS, PERCENT OPEN
    John Doe, 10, 20, 50%
    Jane Smith, 15, 60, 25%
    ...and so on.
    So far I've only been able to get my report to display the
    recordcount of the entire query. In order troubleshoot the problem
    I created a regular cfm page to do the same thing. Here's what I
    did:
    <cfquery name="getreviewers"
    datasource="#APPLICATION.datasource#">
    SELECT DISTINCT Reviewer
    FROM Items
    ORDER BY Reviewer
    </cfquery>
    <cfoutput query="getreviewers">
    <cfquery name="getopenitems"
    datasource="#APPLICATION.datasource#">
    SELECT Status
    FROM Items
    WHERE Status='open'
    AND Reviewer = '#Reviewer#'
    </cfquery>
    <cfset open = getopenitems.recordcount>
    <cfquery name="getallitems"
    datasource="#APPLICATION.datasource#">
    SELECT Status
    FROM Items
    WHERE Reviewer = '#Reviewer#'
    </cfquery>
    <cfset all = getallitems.recordcount>
    <cfset percent = (open / all) * 100>
    #getreviewers.DR_Item_Reviewer#, #open#, #all#,
    #Round(percent)#%
    </cfoutput>
    That worked great, but as you can see I had to nest a couple
    of queries inside a <cfoutput>. I don't know how to
    incorporate this into the report builder, as it seems you can only
    specify a single query. Another thing that occurs to me is perhaps
    I'm going about this the wrong way. Is there perhaps a function
    that will display things the way I want them without fussing with
    multiple queries? Any help would be greatly appreciated. Thanks in
    advance.

    It seems like you are trying to do a subreport. You can nest
    reports within the report feature...just check out the subreport
    feature under the help section. If that doesn't help let me
    know.

  • Question about templates with multiple queries

    I am just starting out with BI Publisher, v.10.1.3.2. I have a report that has multiple queries, but my template is just based on 1 query. How can I make the template use more than one query?
    Thanks!!

    <!-- BI Publisher Report Data Template --!>
    <!-- Report: -->
    <!-- defaultPackage - the PL/SQL package name to resolve any lexical
    references, group filters, or data triggers defined in the template. -->
    <dataTemplate name="dataTemplateName" description="DESCRIPTION" dataSourceRef="ORCL" defaultPackage="<SCHEMA>.<PACKAGE>" version="1.0">
    <properties>
    <property name="include_parameters" value="True|False"></property>
    <property name="include_null_Element" value="True|False"></property>
    <property name="xml_tag_case" value="upper|lower"></property>
    <property name="db_fetch_size" value="500"></property>
    <property name="scalable_mode" value="on|off"></property>
    <property name="include_rowsettag" value="true|false"></property>
    <property name="debug_mode" value="on|off"></property>
    </properties>
    <parameters>
    <parameter name="IDENTIFIER" dataType="character|date|number" defaultValue="0" include_in_output="true|false"></parameter>
    </parameters>
    <!-- Flexfield support for queries against Oracle Applications database -->
    <lexicals>
    <lexical></lexical>
    </lexicals>
    <dataQuery>
    <xml name="xml_query_name" expressionPath="Xpath_expression">
    <url method="GET|POST" realm="auth_name" username="" password="">file:///d:/windir/filename.xml</url>
    </xml>
    <sqlStatement name="query_name">
    <![CDATA[
    SELECT
    FROM
    WHERE
    ]]>
    </sqlStatement>
    </dataQuery>
    <!-- If you have multiple queries, you must link them to create the -->
    <!-- appropriate data output. In the data template, there are two methods -->
    <!-- for linking queries: using bind variables or using the <link> element -->
    <!-- to define the link between queries. -->
    <link parentQuery="parent_query_name" parentColumn="col" childQuery="child_query_name" childColumn="col" condition="= < <= > >="></link>
    <dataTrigger name="beforeReport" source="<package_name>.<function_name>"></dataTrigger>
    <!-- (Required for multiple queries) Defines the structure of the output -->
    <!-- XML. Consists of <group> and <element>elements to specify the -->
    <!-- structure. This section is optional for single queries; if not -->
    <!-- specified, the data engine will generate flat XML. -->
    <dataStructure>
    <group name="group_tag_name" source="query_name" groupFilter="<package_name>.<function_name>">
    <element name="tag_name" value="source_column" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    <element name="tag_name" value="<group_name>.<column/alias name>" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    <group name="group_tag_name" source="query_name" groupFilter="<package_name>.<function_name>">
         <element name="tag_name" value="source_column" function="SUM() COUNT() AVG() MIN() MAX()"></element>
         <element name="tag_name" value="<group_name>.<column/alias name>" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    </group>
    </group>
    </dataStructure>
    <dataTrigger name="afterReport" source="<package_name>.<function_name>"></dataTrigger>
    </dataTemplate>

  • Multiple Queries in a workbook

    Hi Gurus
    If we have multiple queries in a workbook in  3.5 version and when we upgrade it to BI 7.0 version the data got overwrited........ (I heard this scenario from my friend)
    But how to solve this kind of scenario. Does scrolling option works... Please give me some suggestion how to solve this kind of issue
    Regards
    Naga

    A 3.x workbook when opened in 7.0 works fine except for some issues. Variables are shown in text element of 3.x workbook , when this workbook is opened in 7.0 the variables are also shown. By design text element does not show variables except for text variables. There are issues like flickering of workbook when opening the 3.x workbook in 7.0. Variants from 3.x are not imported in 7.0.
    check this out.

  • CF Report Builder - multiple queries

    I am a CF developer who has worked a fair bit with coding
    reports manually. Have taken the plunge with report builder and
    generally like what I see, BUT am quite disappointed with an
    apparent lack of documentation or tutorials on complex reporting
    techniques.
    I need to do a report which ideally requires two queries, the
    results of which the report's purpose is to compare.
    The problem is, from what I can tell, a .CFR can only have
    ONE query (which I find odd). Can anyone suggest a way of being
    able to have more than one query result set passed into a .CFR.
    I am starting to wonder that CF Report Builder might be great
    for fairly basic, single data set reports, but no good for large
    complex reports. I would be interested in hearing others opinions
    on this.
    Many Thanks in Advance.

    Thanks tmschmitt. You are right in that I am (was) stuck on
    passing in multiple queries. What I have managed to do is use the
    Advanced option of the query builder to write my two seperate
    queries, then combine them into one recordset by doing a Query on
    the Queries. Not sure if this is the best way around it, but it
    seems to be working fine. Problem now is that I need to manually
    craete 500+ "Query Fields" (yuk).
    I haven't really delved into the sub-reports yet, but have a
    feeling they won't meet my current needs. Basically i have 253
    columns of demographic data. I need one recordset (A) with this
    data from one geographic location with a recordset from a different
    location (B). I then need to lay out the data with each field from
    B beside it's corresponding field from A. In short, it is a
    comparitive report whereby the reader can compare a given value
    (e.g. avg income) from one area with that from another. This would
    be fairly straightforward in a scripted report, but with Report
    Builder appears to be quite cumbersome and potentially unmanagable
    as I need to handle each field explicitly (rather than looping over
    recordsets and structures to generate the different sections of the
    report).

  • Embedding image and multiple queries in cfgrid

    I have a datagrid that displays a user's work history pulled
    from one query. In the original HTML table set up, a status icon
    for each work item was displayed as either "New", 'Needs Attention"
    or "Archived". This status was determined by using a value from the
    first query as a filter in the WHERE clause of the second query:
    ------------------- Original Query -------------------------
    <cfquery datasource="#application.defaultdsn#"
    name="qQuestions">
    SELECT discussions.dateSubmitted, discussions.discussionID,
    discussions.subjectID, discussions.topic, users.firstName + ' ' +
    users.lastName AS stName,
    subjects.subjectID AS Expr1, subjects.subject
    FROM discussions INNER JOIN
    users ON discussions.userID = users.userid INNER JOIN
    subjects ON discussions.subjectID = subjects.subjectID
    WHERE 0=0
    <cfif getDiscussionIDs.recordCount GT 0>
    AND (
    <cfloop query="getDiscussionIDs">
    discussions.discussionID = #getDiscussionIDs.discussionID#
    <cfif getDiscussionIDs.currentRow NEQ
    getDiscussionIDs.recordCount>OR</cfif>
    </cfloop>
    <cfelse>
    AND 0=1
    </cfquery>
    ------------------------ Queries used to determine status
    <cfquery datasource="#application.defaultdsn#"
    name="LatestMessage">
    SELECT Max(discussionPosts.postID) AS NewestMessage
    FROM discussionPosts
    WHERE discussionPosts.discussionID =
    #qQuestions.discussionID#
    </cfquery>
    <cfset variables.userTypetoView = "tutor">
    <!--- <cfif LatestMessage.recordCount --->
    <cfquery datasource="#application.defaultdsn#"
    name="getLastInfo">
    SELECT discussionPosts.userType,
    discussionPosts.dateSubmitted, discussionPosts.viewerID
    FROM discussionPosts
    WHERE discussionPosts.postID = #LatestMessage.NewestMessage#
    </cfquery>
    My question is how can I emulate this same status icon setup
    in a cfgrid? I used the following ActionScript to create a new
    column in the grid and return a string. However, this new column
    must logically know how to display the correct status IMAGE for
    each corresponding row. As you can see, there are no database
    tables for storing the status - which would have made this much
    easier.
    function setStat(){
    eQArchive.getColumnAt(1).labelFunction = statIcon;
    function statIcon(item
    bject, columnName:String): String{
    if (item[columnName] != undefined) {
    return asIcon;
    else {
    return "";
    I also tried using the toScript() function in CF7 to see if I
    can set a variable equal to the appropriate image and then return
    it in the above script, but this is where I am at a loss.
    <cfif getLastInfo.recordCount GT 0 AND
    Trim(getLastInfo.userType) EQ "tutor">
    <cfset stat = "/images/docArchive.jpg">
    <script language="javascript" type="text/javascript">
    <cfoutput>var #toScript(getLastInfo, "asIcon",
    True)#;</cfoutput>
    </script>
    <cfelseif getLastInfo.viewerID EQ session.tutorID>
    <cfset stat = "/images/docNew.jpg">
    <script language="javascript" type="text/javascript">
    <cfoutput>var #toScript(getLastInfo, "asIcon",
    True)#;</cfoutput>
    </script>
    <cfelse>
    <cfset stat = "Green">
    <script language="javascript" type="text/javascript">
    <cfoutput>var #toScript(getLastInfo, "asIcon",
    True)#;</cfoutput>
    </script>
    </cfif>
    Any ideas on how to get this working is greatly appreciated.
    Thank you in advance.

    Hi Mike,
    To insert multiple queries in a single woorkbook.
    In the Business Explore --> Analyser --> Open the first query and then click on tools button of the BEx add on components and select the option ( Insert Query ).
    Reg's,
    Pratap Reddy Bodimalla.

  • SQL Developer cannot execute multiple queries in one connection

    Hi,
    Using : SQL Developer 1.2.29.98, Oracle Database 9i on Windows XP.
    Currently I have TOAD and PL/SQL Developer to handle things related to Oracle Database.
    I found this SQL Developer tools as an interesting tool which might replace PL/SQL Developer (I assume).
    I opened two SQL Worksheets and tried to execute 2 queries (time consuming one) simultanously, suddenly it freezes (the window become grayed). Just like TOAD, we cannot smoothly execute multiple queries on single connection on SQL Developer
    I can monitor the query process using TOAD (Session Browser) and found both queries are running while SQL Developer window become grayed and seems not functioning. After the queries have been finished, I mean both of them, the SQL Developer window become normal and "alive" again showing the expected results.
    Well, however PL/SQL Developer could handle this. Executing multiple queries in single application is just its unbeatable features.
    We can view the query result once its finished instead of until the others being processed, by just only switch the SQL Windows.
    Is it true that SQL Developer doesn't support executing multiple queries?
    Or is it a feature which we should request?
    Or we have to activate this feature by doing some changes on configuration / preferences?
    (Do we need to open two SQL Developer instances? what a memory consuming solution).
    Regards,
    Buntoro

    SQLDeveloper connections are single threaded and also rather single minded (in that you can't do much else while a long query is running.)
    There is an existing feature request http://apex.oracle.com/pls/otn/f?p=42626:39:3685254426061901::NO::P39_ID:4202 for which you can vote.
    The workaround is to have multiple connections. Not brilliant but it works.

  • Multiple Queries  in Shared Components Report Queries

    Hey all,
    I am creating a report query which has multiple queries and I am running into to some issues with the builder.
    1.Whenever I try to edit a query it always sends me to the same query. (I can see that it is passing a different ID in the url, but the query never changes)
    - Ex: I create a report query and add two queries, SELECT 1 FROM DUAL and SELECT 2 FROM DUAL. no matter which querry i try to edit it always shows SELECT 1 FROM DUAL.
    2. There is no way to delete individual queries.
    - does anyone know a workaround to delete a query? (rather than just deleeting the entire report query)
    Cheers,
    Tyson Jouglet

    This was a bug that has been fixed in APEX version 3.2.1
    (its always helpful to list the version you are using along with your question)
    If you are using this with a BI publisher report layout, you will also get problems with earlier versions as the rowsets don't always get returned in the correct order.
    See this thread for more details....
    Bi Publisher result set question
    I ended up deleting my whole query and spending a long, careful afternoon adding the 33 queries I had in order one by one having made SURE they were all EXACTLY what I wanted using SQL Developer.
    Gus..
    You can reward this reply by marking it as either Helpful or Correct
    ;-)

  • How to combine multiple queries!

    I know this is pretty basic, but I'm confused. Basically, I need to extract all data for a given entity from a highly normalized database. There are probably 2 dozen tables which contain data for a given entity that must be queried. However, rather than constructing one single query that merges all of the tables together to come up with one huge rowset/row format, how could I query each table seperately and combine the results of each query into one XML file? Can I create a clob with the first query and then append subsequent queries to that clob? Not sure what to do, and I can't find any good examples.
    Thanks in advance!

    Thanks, but I don't think that's quite what I'm looking for. In a nutshell, this is what I'm doing and this is the problem I'm having:
    1. I set a string equal to a query.
    2. I use xmlgen.getxml to fetch the xml into a clob.
    3. I parse the clob into a DOMDocument.
    The problem occurs with multiple queries. If I follow this same process for 5 different queries, then I have 5 instances of a DOMDocument, each holding a different queries XML. Now, can I put them together? I tried xmldom.makeNode for each DOMDocument, but the nodes are associated with the Document from which they came. I tried cloning each node to disassociate from it's Document, but that didn't seem to work. Even if it did, and I got all of the nodes together, I kept getting a java.lang.ClassCastException for trying xmldom.makeDocument for a node. I'm lost. How can I combine the results of multiple queries into a single DOMDocument instance? It was suggested that use xmlgen.getXML to get multiple queries into multiple CLOBS, then essentially combine the CLOBS together, and finally parse into a DOMDocument as a last step, but that doesn't really leverage DOMs capabilities. At this point, I may have to go down that road...

  • Multiple Queries Slower

    I am having an issue where the performance slows down drastically if i have multiple queries ( Running around 4 queries ) running at the same time. The performance is good when i have only one query running.
    When i run the queries individually one after an another it takes about 10 secs for each of them to return.
    When i run the queries together then it take more than a couple of minutes for all of them to return.
    Any tips suggestions for any changes in oracle parameters to improve performance, when multiple queries are running at the same time. Another thing, the CPU is not being used to its full capacity. The CPU is somewhere in the 10 to 20% usage.
    Thanks,
    Jay.

    Jayachandra, I think there is a good chance you need to tune one or more of the queries in question as they are probably running poorly using more resources than necessary. Individually they seem OK because total time is short but when combined the poor resource utilization is showing up.
    If running CBO
    run an explain plan on each query.
    update the statistics
    re-run the explain plans and look for differences
    If different retime the queries, you may already be done
    If not different or you spot something that looks wrong such as a full table scan where you think an index should be used then follow standard tuning practice to see what you can get.
    Then once you know the SQL are as good as they are going to get look at the buffer pool to make sure it is just not too small. Many DBA just immediately make the buffer pool bigger if query performance is not good enough, however, this is usually not the correct solution and I believe you should never over-allocate resources because you might need them somewhere else.
    HTH -- Mark D Powell --

  • A single OBIEE report firing Multiple Queries

    HI All,
    I tried the search option and did not find any questions which gives me what I am looking for. If I missed it and the question is already asked, please redirect me to the thread.
    I had a report which had a data issues. When i checked the log, I was shocked to see it firing 10 different queries. Could you guys please tell me exactly when OBIEE decides to split a single query and fire multiple ones?
    Here's some info on the report:
    1. All the columns are from the same subject area.
    2. All the physical tables are in the same database in the physical layer.
    3. All the tables are from the same physical catalog even.
    4. Majority of the columns are from the same fact. The fact table however has multiple LTS(Over 30) involving both fragmentation and content filters.
    Could you guys please let me know  why multiple queries are fired in the above case as well as generally by OBIEE?
    Thanks,
    Abhiram.

    It is recommended not to edit DB features. If you need to change them you might need to take help of oracle support.
    Else you might induce more erratic behavior.
    Not in agreement here. Depending on how that data sources beneath OBIEE are physically set up and parametrized you may be forced to change this in order to assure performance for example. Not all your BI-analyzed sources will be purpose-built for analytics and hence follow usual modellization rules or approaches. Oracle put the features in the DB objects for exactly that reason. And obviously you don't go and change the features "just like that".
    since fact measures are from multiple LTS, every time you bring a measure from different LTS it is treated as another star. So what OBIEE does is it queries each star separately using alias and then stitch them logically. Thats the reason for fragmented queries and a singel long sql in the end with stitches the other sql results in the end.
    True, but the OP was talking about "firing 10 different queries". Which is a bit vague but sounds more like distinct select statements rather than stich-joined WITHs...that's why I directed him towards the features which can actually change this dramatically. Problem is, that the OP hasn't made that exact point clear yet.

  • Creating report with multiple queries in clear quest

    Hi,
    I am new to reports and currently working with creating reports that connect to clear quest(CQ).
    I have successfully created several reports, that connect to the CQ, but they all have data from only one query.
    Now I am trying to create a slightly complex report where I need to fetch data from multiple queries. All these queries use 2 parameter to filter their data. I have dynamic cascading parameters to get them. When just connecting they all work ok. I used the link tab to link them to two fields of one query, to make sure that they all filter to fields from same query.
    The problem is when I drop the fields from the various queries on the form, the data is fetched multiple times.
    I also played with links to make them outer links but in that case I get error and unable to run the report completely.
    Any ideas on how to work with multiple queries and provide same parameters to all of the queries?
    Thanks in advance.
    -PAP

    - How do I make sure that the relationship is not one to many?
    You don't. That's the nature of the data. For example a single person can order multiple items. A simple one to many relationship.
    - In the link tab, I can only point to queries, is there a way I can point the fields to report params?
    You should be seeing tables... I think you're having a tough time with the basic terminology.
    - How does these Enforce Joins (4 options) work.
    There is rarely if ever any reason to switch from the default "not enforced". Leave it alone. The only one you'll touch 90% of the time is the Join Type.
    PAP,
    Based on the questions you're asking, it sounds like you are missing some major database fundamentals. My suggestion would be to step away from CR for the time being and read a little bit about relational databases (what makes them relational) and database normalization. This will also give you an idea about the various join types and when to use one over the other.
    You can know every feature and function in CR, but until you have at least a basic knowledge of how data relates, you'll never pull in the data you need.
    Jason

Maybe you are looking for

  • WLS 9.1 - How to declare datasource for web service?

    If the code for a web service is generated (either a web application or ejb endpoint), how do I make sure the datasource mapping gets added to the appropriate descriptor file? I would like to avoid having to do this manually after running the web ser

  • Battery Drain Iphone 6 after Upgrade to IOS 8.3

    Hi, After upgrading my IPhone 6 from IOS 8.2 to IOS 8.3 couple 2 days ago, I'm keeping the IPhone on power adapter, unbelievable battery drain. I did everything I can to prevent running out of battery: - Brightness - Background applications - Reset a

  • Dreamweaver templates dialogue box

    I work with several sites and take advantage of Dreamweaver's template management. Mostly it's great, but there's one extremely frustrating problem that I hoped would be addressed for the last three DW versions or so: When I'm dealing with sites that

  • Global messages and inilne messages both are being displayed

    Hi, I have a page index.xhtml in which i am including another page header.xhtml like this <ui:insert name="header">                <ui:include src="header.xhtml" />           </ui:insert> my header.xhtml is <?xml version="1.0" encoding="UTF-8"?> <!DO

  • Won't update to 10.5.5

    I recently got a macbook pro and it was (and still is) on 10.5.2. The first thing I did when I started it up was update everything. When it got to installing 10.5.5, it said that it had to restart and so I clicked install and it went to restart with