Query Template Caching Properties

I need to change the IsCachable on the fly in an IRPT page. It seems every property is exposed in the query object EXCEPT IsCachable. Am I missing something?
Assuming I'm not, how can I simply tell the query template to NOT check the cache for this update AND not create a new cache. I know I can change the Rowcount, or anything really, so it won't match up with an existing cache. But IsCachable is true, and this will cause a new cache to be created, which I don't want.

The problem is I need to change the IsCachable property in a web page in response to user input (back and forth at will), and then re-update the applet(s) on the page. So I really need to drive this from javascript, changing IsCachable to whatever the user has selected and then doing the applet update. QueryObject.IsCachable returns an error, no method or property exists. It's also not listed in the Script Assistant.
The idea is I have a scheduled transaction that runs every few minutes and pre-caches BLS transactions that feed reports that are performance problems (Rajeev you should be able to relate to that one). When these reports are run, they now render in a few seconds. I display how old the data is, and have a checkbox they can tick to run the report again withouit using the cache if they have a problem with data that is 10 minutes, or whatever, old. They make the decision to wait for the absolute latest data. Doing this in Javascript is by far the easiest way to handle this. I just don't seem to have access to that IsCachable property.
Rick - It's interesting that you consider it easier to do your own caching. We started down this road and decided it was all getting too messy. It took a while to get total control over xMII caching, but now I find using it much cleaner.

Similar Messages

  • Maintaining multiple query templates

    Hi,
    We created a generic query templates for SQL Query and this query template does not have any query specified inside the Query Template. The SQL query is assigned inside the xMII transaction. Instead of creating and maintaing multiple query templates for various SQL queries, we created this single query template and we use this query template by assigning the SQL query in xMII Transaction at runtime. Will there be any issues around this approach?
    Thanks,
    Sara

    This approach limits the reusability/maintainability of your queries.  If any query is to be used more than once (e.g. in a UI application or more than one BLS transaction), it makes sense to put it in its own query template.  Also, if you want to take advantage of xMII's caching infrastructure, you should also do this.
    There's also a small possibility in the future (I'm no longer with SAP, but just suggesting it is a possible outcome) that the SQL will not be dynamically assignable to avoid SQL code injection security issue(s).

  • How to set the table input in Query template?

    Hi all.
    I need to call a Bapi_objcl_change, with import parameter and a table as an input. I have done this, in BLS. I have set the table input in the
    form of xml. In BLS, I get the output(the value gets change in SAP R3, what i have given in BLS).  But if i set the same xml structure  in
    query template, I didn't get the output. Table input parameter does not take that xml source.  How to set the table input in Query template?
    can anyone help me?
    Regards,
    Hemalatha

    Hema,
    You probably need to XML encode the data so that it will pass properly and then xmldecode() it to set the BAPI input value.
    Sam

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • Query result caching on oracle 9 and 10 vs indexing

    I am trying to improve performance on oracle 9i and 10g.
    We use some queries that take up to 30 minutes to execute.
    I heard that there are some products to cache query results.
    Would this have any advantage over using indexes or materialized views?
    Does anyone know any products that I can use to cache the results of this queries on disk?
    Personally I think that by using the query result caching I would reduce the cpu time needed to process the query.
    Is this true?

    Your message post pushes all the wrong buttons starting with the fact that 9i and 10g are marketing labels not version numbers.
    You don't tune queries by spending money and throwing resources at them. You tune them by identifying the problem queries, running explain plans, visualizing their output using DBMS_XPLAN, and addressing the root cause.
    If you want help post full version numbers, the SQL statements, and the DBMS_XPLAN outputs.

  • Passing query template name to BLS SQL action in the link editor

    I want to have one transaction that uses the SQL query action, but which query template it uses will be dependent on some user input. I am having trouble passing the query name. I'm using the full file path in xml format (i.e. "c://<folder1>//<folder2>//<folderN>//"&PassedFileName&".xml", but with backslashes instead of forward slashes). I got an error around the connector, so I set that too. Then I got an error around mode, so I set it to "FixedQuery". Now I'm getting, "The Query expression was not set with the Query parameter".
    There are only 3-5 possible queries that will be used, so I'd rather build SQL queries and just pass the transaction the name of the query, as opposed to passing the full text of the query each time.
    Thanks,
    Carrie
    Edited by: Carrie Schimizzi on May 9, 2008 6:38 PM
    Edited by: Carrie Schimizzi on May 9, 2008 6:39 PM
    Edited by: Carrie Schimizzi on May 9, 2008 6:40 PM

    Carrie,
    If you haven't already done so, configure your master BLS transaction with a proper representative runtime variation, which will make the whole process simpler to create and troubleshoot.  Quite often when people try to use the dynamic capabilities of MII, they end up getting confused because of user over-complication.  In your SQLQuery action block make sure you configure it to a valid template that would be one that the user would provide as an input (don't forget to allow the generation of sample results for making any subsequent trx efforts easier).  Then look in the link editor and you should see this string value for the query template link if you hover over the corresponding blue T icon.  This will show you the format you need to provide from your Transaction input property (which should also have a valid default value assigned so you can test the transaction by itself, without needing to initially rely on the Xacute Query template layer.
    Regards,
    Jeremy

  • Transaction demarcation in query templates and BLE?

    We have a business process which needs to insert N-many records into a table as a single transaction - if one insert fails, they all rollback.  The number of records and record values are, of course, variable.  How does xMII 11.5 support this or does it? 
    I could think of some very ugly hacks using a fixed query and creative use of query template parameters, but I'd rather not go there.
    Thanks,
    -tim

    XMII has no database transactional support.
    The last site I worked at rolled their own action block to handle this and support distributed transactions.  Basically, any number of data connections and SQL statements could be passed to the action block and then commiited in one pass.  It was quite a bit of work but it was a major requirement of the client.

  • Calling Oracle stored procedure from xMII Query Templates.

    Hi All,
    We have a requirement to call a Oracle stored procedure from xMII, the SP expects some inputs and then it returns multiple rows.
    I tried different approches with no results, I remember some posts on the same topic but I could not get in search results.
    Looking for some help in this regards
    Rupesh.

    Hi Rupesh Bajaj,
    In oracle stored procedure we have to use Packages..if you used packages the u have to assign to some variable.
    To calling Stored procedure  in Query Template is CALL Testing('[Param.1]','[Param.2]',,:X)
    In above line Testing is Stored procedure name and Param.1 is parameters and X is Package.
    Thanks
    Ravilla Ramesh

  • Max No. of columns returned in Query Template

    Hi All,
    Is there any limit to the max number of columns that can be returned for a sql query using the Query Template?
    Regards,
    Arijeet

    Hi Rick,
    I am basically querying a database table which has a large number of columns. Of which I need only a few. Unfortunately though some of the columns I need are not in those that are shown by default when I do a SELECT * or in the list of columns that show up in the Query Template. I am using UDS to connect to the other system and when I try to SELECT the columns which are of interest to me the connection is reset and the UDS Instance for that connection stops. I could access all the columns in the BLS so I am presently using a work around by running an xacute query to show me the data.
    Regards,
    Arijeet

  • Problem Calling MaxDB stored procedure with output from MII Query template

    Hi,
    I am using Max DB Database studio to write stored procedure, I am calling stored procedure from MII Query using CALL statement.
    Can anyone guide me how to pass output values of stored procedure.
    Examlpe::
    call ProcName('[Param.1]','[Param.2]','[Param.3]','[Param.4]','[Param.5]', :isSuccess, :Trace)
    In the above line of code I am not able to get the output values of stored procedure that is isSuccess and Trace values in Query template when executed. But same thing I get when executed in Database studio.
    How do I call with outputs for any stored procedure in MII.
    Any help would be appriciated.
    Thanks,
    Padma

    My call statement is like this
    call RESULTDATA_INSERT('[Param.1]','[Param.2]','[Param.3]', :isSuccess, :Trace)
    I am able to insert record in DB, But I am not getting output values in Query template.I have done this in Fixed Query, when I execute it throws me "Fatal error as Loaded content empty".
    I tried giving select below call but it dont work.
    Regards,
    Rao

  • Stored Procedure Output Issue in Query Template

    Hi,
    We have written a stored procedure which returns 3 outputs which are of type CLOB. Whenever we call the procedure from query template it gives an error Wrong number or type of parameters. It seems that we need to pass some variables which are of type clob to the procedure while calling which we cannot do as per my knowledge in query template.
    Even if we are able to get the output we will not be getting complete output since the out put values are of type CLOB.
    Can you guide me how to achive this
    Thanks,
    Shalaka

    Hi,
    Sometime back i faced the similar problem. But I used oracle pipelined functions to achieve this....
    The basic thing is it will break the chunk into records of length of 4000 chars and it will return in a table. And from other end you can loop and concatenate. Hope this helps....
    create or replace FUNCTION FN_GEN_XML RETURN dashb_xml pipelined IS v_xml CLOB := NULL;
    v_temp VARCHAR2(4000) := NULL;
    v_counter NUMBER := 1;
    BEGIN
      SELECT somefunction(0)
      INTO v_xml
      FROM dual;--v_xml here is clob type. here you might need to call your proc and get it into this variable.
      dbms_output.put_line ('length of v_xml is:' || length(v_xml));
      DBMS_OUTPUT.PUT_LINE('start of this function');
      LOOP
        v_temp := SUBSTR(v_xml,   v_counter,   4000);
        EXIT
      WHEN v_temp IS NULL;
      DBMS_OUTPUT.PUT_LINE(to_char(v_temp));
      pipe ROW(v_temp);
      v_counter := v_counter + 4000;
    END LOOP;
    RETURN;
    END;
    Regards,
    Ravi Kumar

  • How to use ColumnList MOde in Query Template

    Hi,
    I am working on SAP MII 11.5 and having trouble with SQL Query Template with Column List mode.
    It is throughing an error "Enter a table Name.
    Please help me in this regard

    You will need to use the Group parameter with the table name.
    <PARAM NAME="Group" VALUE="Employees">
    You can also set it with javascript for interactive use that would emulate the Template Editor:
    document.APPLET.getQueryObject().setGroup("Employees");

  • Using RRW3_WEBRFC to insert BW query template into BSP: chart not visible

    Hi people,
    I've done a BSP page which calls a BW query template throught RRW3_WEBRFC function and inserts its code in the BSP. I've used the example code BW web reporting inside a BSP page. and all is OK but the charts.
    Charts are not displayed. I change the "<img src..." of the dowloaded HTML and the chart is displayed in Firefox, but not in Internet Explorer. I've asked more people to test the BSP page with its Explorer, a no one can see the image.
    Does anyone have an idea about whats happening? Maybe some system variable of the web server in SICF is distincting the Client Navigator?
    Thank you very much!
    Edited by: Sergi Marin on Feb 13, 2008 9:26 AM

    Whew! I figured out a really awesome solution, which has a
    ton of uses.
    First of all, as I should have realized, ANY variable in a
    coldfusion tag is going to be figured out when the report is
    called, NOT for every query result. In other words, query.xxx or
    report.xxx or whatever is NEVER going to work correctly inside of a
    tag, not even in a report function or the Advanced Query builder.
    However, there is a straightforward way around this. Simply
    make a report function with arguments, and in your field's
    expression editor call the function and pass in the query or report
    variables:
    #report.yourFunction(query.field1, query.field2)#
    You can do all sorts of Coldfusion function magic and return
    whatever form of result you want.
    For my particular example (dynamically creating a query
    object for a chart to be inserted), I had to add a not-so-obvious
    step: creating my query object with a shared scope (in this case,
    the Request scope), otherwise the variable is trapped in the
    function's scope. So this was my solution: I had a chart with the
    "Print When" option calling my function "getChartQuery" (passing in
    the query variables, of course). The function builds
    "Request.ThisChartQuery" and returns True if there's something in
    it (the "Print When" logic uses the boolean to decide whether to
    show the chart or not). Then my chart is still query-based, but the
    Advanced Query builder has NOTHING in it at all, except for the
    variable containing the query object ("Request.ThisChartQuery").
    There was another solution I found where the report function
    makes the entire chart (using cfchart tags, etc) and saves it as a
    PNG file, and then returns the path to the image. Then you simply
    add an image field to the report, and you use the expression
    builder to call the function. Well, hope this helped someone!
    EDIT: references are "
    http://www.adobe.com/go/ee54cc6"
    and "
    http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:40786"

  • Problem in Testing the Query Template

    Hi All,
      I created mysql connection in the Dataservers and connection status was successful.we created FixedQuery(Fixed Query is SQLQuery Template type) in the query template editor.when i am trying to test the sql query "select * from emp" it is not displaying any result template.But sql query is working fine we tested in MYSQL server console.
    please do the need ful
    Regards
    Srikanth M

    Hi,
    I written fixed sql query(select * from emp) in the  query tab,When i select the "Test" button one window is opening ,text/html selected  and submited "OK" button .It is not opening any result template in the browser.
    Regards
    Srikanth

  • Pinning the sql query in cache

    Hi All,
    I want to pin the sql query is cache because the physical reads are very high. Can anyone tell me steps to pin the sql query in the cache. Current version 10.2.1.0 OS : Windows.
    Reads CPU Elapsed
    Physical Reads Executions per Exec %Total Time (s) Time (s) SQL Id
    19,836 38 522.0 2.1 25.40 50.00 1r0wh3v6bayyk
    With regards
    kccrga

    Oscar,
    I've read Carys paper and a good paper it is.
    The point I was trying to get across is that there should be no rules of thumb. (par this one of course ;) )
    It all depends. Should one concentrate on reducing cpu usage on a disk-bound system? Is doing, say, 100 single-block reads from disk faster than doing 100 current mode gets?

Maybe you are looking for

  • IPhoto doesn't see photos in the library

    Hope someone can help. The external hard drive holding my iPhoto library accidentally disconnected while I was working in iPhoto. Now, iPhoto does not see any photos in it, even though that library shows up as a choice when I reconnect it. Finder sho

  • Hi my safari won't let me open it. This the report I keep getting

    Hi my safari won't let me open it. This the report I keep getting Process:               Safari [427] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier:            com.apple.Safari Version:               8.0.2 (10600.2.5) Date/Time:    

  • Where 2 go for help with some questions about a logo design?

    I'm an absolute novice Illustrator user (CS4). Im doing a web site for a mate and he's given me a logo that I have made a vector drawing of. It was black and white, and I made it coloured but I have discovered that colour gets difficult when you go f

  • IOS8 missing full access keyboard toggle

    With a third party keyboard installed, there's supposed to be a toggle for "enable full access" on / off. I just added a simple keyboard (simple key) - to get something with the row of number keys on top after all these years - and would leave full a

  • Text on the back of printed photos

    Can text be added to the back of printed photos when using Apple's photo printing service.