How to run a query several times?

Hi all,
Anyone has a clue for the following situation:
We have made a query (on the web) with several characteristics and key-figures. One of the characteristics has unique values that occurs only once (something like numbers for documents in R/3). The query was build with only one user-input variable based on this characteristic. The query was build especially for printing and fits exactly on a A4-paper.
We would like to give the end-user a tool in which he/she can store several values for the characteristic. On the basis of these stored values the system has to run the query several times.
Something for the Reporting Agent or is there an other solution?
Thanks in advance,
Henk.

hi Henk,
'control query' in few words is to filter data with combination of characteristic value.
http://help.sap.com/saphelp_nw04s/helpdata/en/6e/b5663a5fb46752e10000000a11402f/frameset.htm
Control Query for Pre-calculating Web Templates
Definition
A control query is a help query that you execute before you execute the queries in the Web template, and use the result to parameterize the Web template.
Use
You can specify a control query as significant information in the Reporting Agent settings for a Web template. When you specify a control query, the system does not pre-calculate the Web template itself, but a number of filtered views from the Web template.
We particularly recommend this procedure when wanting to calculate several Web templates only distinguished by their filter values in one swoop.
Using a control query in particular allows you to formulate complex selection criteria for the data to be pre-calculated.
Pre-calculate only the TOP50 customers, whose data is frequently requested, for example.
Structure
A very simple query, which contains exactly those characteristics in the drilldown in the rows according to which the Web template will be filtered, is particularly suitable as a control query. Every row in the table that a control query delivers, subsequently serves as a dynamic filter for the Web template views.
The respective combination of characteristic values is used as a filter for the Web template Data Provider for each table row. The background run produces pre-calculated data records, in actual fact one data record for each table row that delivers a control query.
If a characteristic does not appear in a view, the filter value is ignored.
In addition, you automatically get only those filter value combinations, for which data exists in the InfoCube used to define the control query.
Example
A typical application of this approach for pre-calculating a Web template is with cockpit applications, since they are controlled mainly through selection lists and no real OLAP navigation is necessary.
You can also use a control query for filtering when pre-calculating Crystal reports queries. You can find additional information under Defining Crystal Reports Queries Settings.

Similar Messages

  • Posted this query several times but no reply. Please help me out

    Hi all,
    How to know whether a servlet had completely sent its response to the request.
    The problem what i am facing is, I send response to a client's request as a file.
    The byte by byte transfer happens, now if the client interrupts or cancels the operation, the response is not completed.
    At this stage how to know the response status. I am handling all exception, even then I am unable to trap the status.
    Please help me out.
    I have posted this query several times but no convincing reply till now. Hence please help me out.
    If somebody wants to see the code. I'll send it through mail.
    regards
    venkat

    Hi,
    thanks for the reply,
    Please check the code what I have written. The servlet if I execute in Javawebserver2.0 I could trap the exception. If the same servlet is running in weblogic 6.0 I am unable to get the exception.
    Please note that I have maintained counter and all necessary exception handling even then unable to trap the exception.
    //code//
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.security.*;
    public class TestServ extends HttpServlet
    Exception exception;
    public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException, UnavailableException
         int bytesRead=0;
         int count=0;
         byte[] buff=new byte[1];
    OutputStream out=res.getOutputStream ();
    res.setContentType( "application/pdf"); // MIME type for pdf doc
    String fileURL ="http://localhost:7001/soap.pdf";
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    boolean download=false;
         int fsize=0;
         res.setHeader("Content-disposition", "attachment; filename="+"soap.pdf" );
    try
                   URL url=new URL(fileURL);
         bis = new BufferedInputStream(url.openStream());
         fsize=bis.available();
         bos = new BufferedOutputStream(out);
    while(-1 != (bytesRead = bis.read(buff, 0, buff.length)))
              try
                        bos.write(bytesRead);
                        count +=bytesRead;
                        bos.flush();
                   }//end of try for while loop
                   catch(StreamCorruptedException ex)
                        System.out.println("Exception ="+ex);
                        setError(ex);
                        break;
                   catch(SocketException e)
                        setError(e);
                        break;
                   catch(Exception e)
                        System.out.println("Exception in while of TestServlet is " +e.getMessage());
                        if(e != null)
                             System.out.println("File not downloaded properly"+e);
                             setError(e);
                             break;
                        }//if ends
                   }//end of catch for while loop
    }//while ends
              Exception eError=getError();
              if(eError!=null)
                   System.out.println("\n\n\n\nFile Not DownLoaded properly\n\n\n\n");
              else if(bytesRead == -1)
              System.out.println("\n\n\n\ndownload \nsuccessful\n\n\n\n");
              else
              System.out.println("\n\n\n\ndownload not successful\n\n\n\n");
    catch(MalformedURLException e)
    System.out.println ( "Exception inside TestServlet is " +e.getMessage());
    catch(IOException e)
    System.out.println ( "IOException inside TestServlet is " +e.getMessage());
         finally
              try
         if (bis != null)
         bis.close();
         if (bos != null)
         {bos.close();}
              catch(Exception e)
                   System.out.println("here ="+e);
    }//doPost ends
    public void setError(Exception e)
         exception=e;
         System.out.println("\n\n\nException occurred is "+e+"\n\n\n");
    public Exception getError()
              return exception;
    }//class ends
    //ends
    regards,
    venakt

  • How to run the query in  screen painter

    i am using the patch 36 in business one so pls give information  about 
       how to run the query in  screen painter 
    regard
      sandip adhav

    Hope u have reached Screen painter interface,
    1. Click 'Add Grid' from tool bar.
    2. Go to 'Collections' tab in 'Properties' window.
    3. Choose 'Data Tables' from the Drop down list.
    4. Click 'New' found at the bottom of the Properties Window(same window)
    5. U'll find the place to insert ur query.
    6. U can rename the table name from 'DT_0'
    7. Choose type as 'Query'
    8. Clear content from box 'Query'
    9. Enter ur query there. Dont forget to Click 'SET'
    10. Go to Preview option from tool bar.
    now ur query will be displayed as table format.
    Note: First try with simple query b4 going for linking option.
    Regards,
    Dhana.

  • I can't find the mac app store on my imac. i am running snow leopard, and i have run "update software" several times. what's up?

    I am trying to upgrade to Lion. I need to go through Mac App store to buy it. I need to get the Mac App store icon in my dock. I have run Update Software several times, trying to get the Mac App store onto my iMac, but with no luck. It doesn't show up in the dock, it doesn't show up in Finder under Applications, and it doesn't show up when I search in Searchlight for App Store, Store, Mac App Store, etc. What am I doing wrong?

    I am running snow leopard
    James....
    You arne't necessarily doing anything wrong.
    Install the Mac OS X 10.6.8 Update Combo
    That should reinstall the App Store for you.
    Restart your Mac after the combo is finished installing.
    You should see the App Store icon in the Dock and be able to access from your Apple menu also.
    Make sure your Mac meet's Lion's requirements

  • I am running Windows XP, SP3. I have tried to run Firefox 4 several times but it doesn't work properly. The main page comes up showing the logo, below that is the search box, and below that is another box with nothing in it.

    I am running Windows XP, SP3. I have tried to run Firefox 4 several times but it doesn't work properly. The main page comes up showing the logo, below that is the search box, and below that is another box with nothing in it.

    The external DVD/CD Writer will Not appear on your desktop when you attach it to your iMac.  It will appear in "Finder", which is in your Dock.
    Hope this helps

  • Is there something wrong if I run language import several time?

    Is there something wrong if I run language import several time? For supplementation I am sure but for import not

    Hi Tina ,
                       You can import many times. If you have any test system try to import basis patch on it and import language pack.
    Regards,
    Hari.

  • How to obtain the Query Response Time of a query?

    Given the Average Length of Row of tables and the number of rows in each table,
    is there a way we get the query response time of a query involving
    those tables. Query includes joins as well.
    For example, suppose there 3 tables t1, t2, t3. I wish to obtain the
    time it takes for the following query:
    Query
    SELECT t1.col1, t2.col2
    FROM t1, t2, t3
    WHERE t1.col1 = t2.col2
    AND t1.col2 IN ('a', 'c', 'd')
    AND t2.col1 = t3.col2
    AND t2.col1 = t1.col1 (+)
    ORDER BY t1.col1
    Given are:
    Average Row Length of t1 = 200 bytes
    Average Row Length of t2 = 100 bytes
    Average Row Length of t3 = 500 bytes
    No of rows in t1 = 100
    No of rows in t2 = 1000
    No of rows in t3 = 500
    What is required is the 'query response time' for the said query.

    I do not know how to do it myself. But if you are running Oracle 10g, I believe that there is a new tool called: SQL Tuning Advisor which might be able to help.
    Here are some links I found doing a google search, and it looks like it might meet your needs and even give you more information on how to improve your code.
    http://www.databasejournal.com/features/oracle/article.php/3492521
    http://www.databasejournal.com/features/oracle/article.php/3387011
    http://www.oracle.com/technology/obe/obe10gdb/manage/perflab/perflab.htm
    http://www.oracle.com/technology/pub/articles/10gdba/week18_10gdba.html
    http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php
    Have fun reading:
    You can get help from teachers, but you are going to have to learn a lot by yourself, sitting alone in a room ....Dr. Seuss
    Regards
    Tim

  • How to run this query to get the minutes between two hours?

    Hi all,
    Hope doing well,
    sir i am running one query which is:
    v_TotalHrsMin1 := LPAD((extract(minute from TO_TIMESTAMP (v_Temphrs,'HH24:mi:ss')) - extract(minute from TO_TIMESTAMP (v_Outtime1,'HH24:mi:ss'))), 2, '0');--select to_date(v_temphrs,'YYYY-MM-DD HH:mi:ss')-to_date(v_OutPunch,'YYYY-MM-DD HH:mi:ss')*1440;
    in this v_TotalHrsMin1 is number datatype and v_Temphrs is varchar2 which is storing this value: 12:00:00
    and v_Outtime1 is varchar2 which is storing 06:00:00
    now i want the minute difference between both times
    and insert into v_Totalmin1.
    but getting null value in v_totalmin1.
    thanks

    952646 wrote:
    Hi Sir,
    i used query like this: v_TotalHrsMin1 := extract(hour from time_interval) * 60 + extract(minute from time_interval) from (select to_timestamp(v_temphrs,'HH24:MI:SS')-to_timestamp(v_outtime1,'HH24:MI:SS') time_interval from dual);That is not a query - that is a PL/SQL assignment expression. You should learn the differences between SQL and PL/SQL and how they work together ;-)
    When doing it in PL/SQL, you do not need a query at all. Why would you do a select from dual in the PL/SQL assignment.
    But you should be able to take the SQL example I gave you and write the equivalent PL/SQL code.
    We do not want to do your work for you - we want to teach you how to do it yourself.
    You should try and understand the examples we give you - not just cut-and-paste it and cry for help when you are cut-and-pasting a SQL example into PL/SQL code.
    Anyway - here's a way to do it in PL/SQL:
    declare
       v_outtime1  varchar2(8);
       v_temphrs   varchar2(8);
       v_interval  interval day to second;
       v_totalhrsmin1 number;
    begin
       v_outtime1 := '06:00:00';
       v_temphrs  := '12:00:00';
       v_interval := to_timestamp(v_temphrs,'HH24:MI:SS')-to_timestamp(v_outtime1,'HH24:MI:SS');
       v_totalhrsmin1 := extract(hour from v_interval) * 60 + extract(minute from v_interval);
    end;
    /What's so difficult about taking my SQL example, understanding what the differenct functions do, and then write that piece of PL/SQL? ;-)

  • How to run a webdynpro multiple times by passing different parameters each time and save webpages with parameter name?

    Hi Experts,
    I am a BW consultant and new to webdynpro. Not sure how to run RSO_METADATA_REPOSITORY multiple times and by passing different parameter values each time(either taken from an a standard BW table or user provided - anything is fine) and build web pages with parameter name. Need help with direction on where to start.
    Let me step back and explain my requirement:
    In BW we have an object called transformation.
    One way of generating documentation for transformation is highlight transformation and press F1. Then its documentation will be opened as a local web page.
    I need these web pages for all transformations. This is my requirment.
    I came to know that RSO_METADATA_REPOSITORY is beeing used to generate this web page.
    The web link is something like below:
    http://ubw05.xxx.com:8005/SAP/BW/DOC/METADATA/?page=BW_O_D&SystemID=BWPCLNT100&ClassID=TRFN&ID=0KHR6J65AIIUTCJZEC093K6XDFV909PB&objectVersion=A&sap-language=EN&sap-client=100
    When i run this link seperately(not by selecting transformation and pressing F1) i need to enter login credentials to BW system.
    My challenges is how do i pass login credentials and multiple transformation IDs to generate multipe web pages with each page named by transformation ID?
    WHere to start? First of all is RSO_METADATA_REPOSITORY Webdynpro JAVA or webdynpro ABAP or can i use anything?
    Since it is beeing opened as local webpages i assume it is webdynpro JAVa is that correct?
    Thanks,
    Raghu

    hello,
    might be a problem with the version you are using.
    regards,
    the oracle reports team

  • How to run simple query on oracle 11.2.0 ?

    hi
    i installed oracle 11.2.0 64bit on my Windows-7 64bit
    how i can connect and run any query on oracle ?
    what are the default tools that came with the installation and how to use it ?
    i sow in the forum that people write
    sql> select * from myTable ........
    how to get to this ?
    thanks in advance

    user1036207 wrote:
    hi
    i installed oracle 11.2.0 64bit on my Windows-7 64bit
    how i can connect and run any query on oracle ?
    what are the default tools that came with the installation and how to use it ?
    i sow in the forum that people write
    sql> select * from myTable ........
    how to get to this ?
    Open a command prompt and type
    sqlplus sys/syspwd@instance as sysdbaand you'll have yourself a sqlprompt.
    HTH
    //Johan

  • Once the aggregated cube how to run the query

    hai ,
    i had cube havind lot of data .
    so i was used aggregation .
    after that how to run  query from aggragated cube
    when ever i went to rrmx . but it has showing not aggregated cube.
    once aggregate the cube where is stored
    plz let me know

    InfoCube aggregates are <b>separate database tables</b>.
    Aggregates are more summarized versions of the base InfoCube.  There is an aggregate fact table, e.g.  /BIC/E1#####  ===>  /BIC/E100027.  If you don't automatically compress your aggregates, there would also be an F fact table /BIC/F100027,
    There are aggregate dimension tables that are also created, e.g. /BIC/D1000271.  If a dimension for the aggregate is the same as the base InfoCube, then there is no aggregate dimension table for that dimension and the queries will use that dimension table from the base cube.
    As long as the agggregate is active, the BW automatically will use it instead of the base cube as long as the aggregate contains all the characteristics necessary to satisfy the query. 
    You can verify the aggregate's usage by looking at info in table RSDDSTAT - it will show the Aggregate number if used (will not show aggregate usage for queries on a MultiProvider if you are on a more recent Svc Pack).
    You can also run the query thru RSRT, using the Exec & Debug option - check the "Display aggregate found" option and it will display what aggregate(s) it found and which one(s) it used.

  • My track pad highlights applications and files and then opens them without my doing anything. I run MacKeeper and having run the scan several times only get cleaning issues (5 -). Any ideas as MacKeeper Kromtech have not responded to my calls nor email.

    Folks
    I run an iMac. Today for some reason when I run the cursor across the screen applications and files are highlighted and then opened without me doing anything (no clicking etc) In fact print at times opens. As far as I can tell I have not changed any settings except to open firewall.
    I run MacKeeper and when I run a scan only a few cleaning items open. Safe and fast are as they should be. I run fix. If I again run the scan I get a few more but different claeing items to fix.
    I have rung MacKeeper several times without getting through. The occasion I did get through the bloke said he could not help and passed me to a higher authority. Needless to say the line dropped out after 30 minutes waiting.
    As it is the weekend and I do not live near an Apple store I am quite keen to get the problem identified and fixed so I can continue working.
    Your assistance please.

    Remove the "MacKeeper" scam product as follows. First, back up all data.
    "MacKeeper" has only one useful feature: it deletes itself.
    Note: These instructions apply to the version of the product that I downloaded and tested in early 2012. I can't be sure that they apply to other versions.
    IMPORTANT: "MacKeeper" has what the developer calls an “encryption” feature. In my tests, I didn't try to verify what this feature really does. If you used it to “encrypt” any of your files, “decrypt” them before you uninstall, or (preferably) restore the files from backups made before they were “encrypted.” As the developer is not trustworthy, you should assume that the "decrypted" files are corrupt unless proven otherwise.
    In the Finder, select
    Go ▹ Applications
    from the menu bar, or press the key combination shift-command-A. The "MacKeeper" application is in the folder that opens. Quit it if it's running, then drag it to the Trash. You'll be prompted for your login password. Click the Uninstall MacKeeper button in the dialog that appears. All the functional components of the software will be deleted. Reboot.
    ☞ Quit MacKeeper before dragging it to the Trash.
    ☞ Don't empty the Trash. Let MacKeeper delete itself.
    ☞ Don't try to drag the MacKeeper Dock icon to the Trash.

  • How to run a query in VEV HTML application?

    Hello,
    We are developing an HTML application using VEV sdks. Anybody knows how we can run a query saved in a .rhq file using on-click event in HTML?

    You call the executequery(string) JavaScript function. That means you need to have the text from the rhq file. You can ignore the comments there (// lines and text following // on any line).
    If you you want to read the text literally from the file, you can do that in HTML5 with a method like this
    How to open a local disk file with Javascript? - Stack Overflow
    Most likely you will use fixed strings or compose them in JavaScript and then run them via the function call.

  • How to reduce this query execution time !

    Just use your original cursor as an inline view, like so:
    CREATE OR REPLACE PROCEDURE SP_TEST_audit_history2
    (p_start IN date,
    p_end IN date,
    p_msgcode IN varchar2,
    p_partnername IN varchar2,
    p_status IN varchar2,
    p_locationname IN varchar2,
    p_custbusunit IN varchar2,
    p_sysaudithistory_cur OUT plutotypes.ref_cursor,
    p_status1 OUT NUMBER)
    AS
    BEGIN
    OPEN p_sysaudithistory_cur
    FOR
    SELECT tfm.hubmsgid,
    tfm.status || '-'|| nvl2 (tfm.exception_id, 'FAILED', 'OK'),
    tfm.datetime,
    tfm.exception_id
    FROM tfm_status tfm,
    (SELECT DISTINCT MAX (tfm.datetime) datetime, tfm.hubmsgid
    FROM tfm_status tfm, vw_msgcode_part_locn vw
    WHERE tfm.datetime >= NVL (p_start, TO_DATE ('01/01/1981', 'DD/MM/YYYY'))
    AND tfm.datetime <= NVL (p_end, TO_DATE ('31/12/9999','DD/MM/YYYY'))
    AND tfm.msgcode LIKE NVL (p_msgcode, '%')
    AND vw.msgcode = tfm.msgcode
    AND vw.partnername LIKE NVL (p_partnername, '%')
    AND tfm.status LIKE NVL (p_status, '%')
    AND vw.locationname LIKE NVL (p_locationname, '%')
    AND vw.custbusunit LIKE NVL (p_custbusunit, '%')
    AND rownum < 250
    GROUP BY tfm.hubmsgid) c_hubmsgids
    WHERE tfm.hubmsgid = c_hubmsgids.hubmsgid /* here only i am getting error*/
    AND tfm.datetime = c_hubmsgids.datetime
    AND tfm.status like NVL (p_status, '%');
    p_status1 := 0;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN p_status1 := 1;
    END SP_TEST_audit_history2;
    If i run this query it is taking 18 seconds to retrive the records becoz of that group by clause..
    Can any body suggest any changed in code ( any hints) to make it faster that is execution time will be less than 10 seconds
    Thanx in advance
    prasanth a.s.

    Try removing the word distinct and see if that helps. Distinct should not be needed since the max and group by will result in distinct values.

  • How to know exact query execution time.

    Hi,
    I want to know what is exact query execution time which excludes network access, constructing results. Please suggest me.
    Thanks in advance,
    Satish.G

    Not sure I know what you really want, but if this is a testing phase sort of thing and you are running on unix, there is the time command.
    If you want something that is part of your application, you can run a timer in a separate Thread - for approximate time.
    If you want more precise time, you can use java.util.Date - it has a method getTime(), which you can use before processing and again after processing and subtract the former from the later.

Maybe you are looking for

  • CS4 Premiere locking up royally on little mts files on Mac Pro Lion 10.7, is CS5.5 any better

    Sorry for long title, got the boxes mixed up. Having trouble working with HDV mts files in CS4 Premiere on a new 12 core MAC Pro with Lion 10.7 OS Have used Adode CS3 and now CS6 at my office regularly. CS6 can work with about any file type. Found th

  • Optical Out Brack

    Hi everyone, I recently bought a SB Audigy 2 ZS. I happen to have a SDPIF (optical out) bracket that came with my motherboard. I've been able to use this with my onboard sound (Realtek AC'97) without any problems. My question is: can I connect this o

  • About table maintenance generator

    hi, 1. why we have to give a function group name while creating table maintenance generator for a ztable. 2. while creating tmg we have to check one of the radio button under recording routine. wht does recording routine means?

  • PNGs resizing themselves when dragged to stage.

    I'm having a heck of a time trying to figure out why my PNG files which are 791px x 567px in my library resize themselves to 593px x 435px when I drag them to the stage! Dragging GIF or JPG files to the stage does not resize them. What am I doing wro

  • How do I turn HD settings off to sync to ipod nano?

    I have a 5th Generation iPod nano, and I recently purchased an episode of "Doctor Who", but apparently it won't sync to my ipod. I begin to figure its the HD setting and I have tried to turn it off using the playback option in prefences and set it to