Problem of using Parameters in Query templates

Hi,
  how do use parameter values in SQL query in query templates? i have 2 field database no1, no2. i want to filter it by no2 by using param. i gave in filter field of query template as order1.no2 like '[Param.1]' and in parameters as % and clicked set. when i test it, it is showing error..
help me.
- senthil

Hi,
   I tried that mode is query, filter expr is order1.no2 like '[Param.1]'  and  in parameters % . It is showing all the cols.
-vijaya

Similar Messages

  • SAP UI5 Chart using SAP MII Query template

    Hi All, I am new to SAP UI5. I am trying to create SAP UI5 chart using SAP MII Query template. could anyone please tell me how to pass the Query Template as input to the SAPUI5 Chart? If possible please share sample code for doing so Regards Praveen Reddy

    Hi,
    If you want to embed UI5 objects in an IRPT here is a very simple code snippet:
    <HTML>
    <HEAD>
      <TITLE>TestUI5</TITLE>
    <SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid,i5SPCChart"></SCRIPT>
      <SCRIPT>
      var Grid = new com.sap.xmii.grid.init.i5Grid(SpecifyDisplayTemplateHere, SpecifyQueryTemplateHere);
      Grid.setGridWidth("640px");
      Grid.setGridHeight("400px");
      Grid.draw("div1");
      </SCRIPT>
    </HEAD>
    <BOD
      <DIV id="div1"/>
    </BODY>
    </HTML>

  • 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

  • Problem with using a Spatial Query in a report region

    All: I am trying to create a report region using the below query. The query is syntactically correct and returns 10 rows. I have checked it out in SQL Developer AND in APEX SQL Workshop. It returns rows in 1-2 seconds.
    However, after putting the query into a report region, the APEX page locks up when it runs. I've tried masking it in a view, using other functions. I can places the spatial function in the select clause and it works. However, placing the function in the Where clause causes the page to lock up.
    Any thoughts?
    Thanks,
    John
    select lastname, address
    from changetracking.individuals
    where sdo_nn (spatiallocation, MDSYS.SDO_GEOMETRY(2001,8265,MDSYS.SDO_POINT_TYPE(-87.55728,33.137569,null),null,null), 'sdo_batch_size=10') = 'T

    QImaging is not officially supported in the Measurement & Automation (MAX) toolkit, though you may find some luck with our free legacy QImaging LabView interface here: http://www.qimaging.com/support/downloads/software/windows/QCamLabViewInstaller221.exe depending on the version lf LabView you're using.If you're looking for something that is actively updated and supported, you may want to get back in touch with Fred at +1.800.874.9789 and ask about our SITK LabView interface as well.
      PMQI_Josh,
    Yes I've already installed the LabVIEW interface beforehand. Also the version of LabVIEW I'm currently using is 8.6. I'll get in contact with Fred to see if there's a solution to this problem. Thank you.

  • Problems with passing parameters for WEB template in URL in NW2004s

    Servus,
    We have NW2004s, BI 7.0, SP9
    does anybody know where do I make a mistake? There are 9 variables which the user has to fill out.
    Passing the parameters in URL string for a web template like: http://server:50100/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=TEMPLATENAME&var_name_1=ZvarX&var_value_ext_1=2000 ....
    but this doesn't function, I get only the first variable screen and not what's set in my URL.
    Is it a bug? Any suggestions?
    Thank you very much
    Standa

    I solved it.
    Solution:
    URL Link "http://......./TEMPLATE=nameofthepage&TEMPLATE=nameofthepage
    &VARIABLE_VARIANT=nameofthevariant"

  • Problem while using Parameters in Message Mapping in Multi Mapping Scenario

    Hi,
    I am working on a scenario in PI 7.1, in which I need to pass output of Message Mapping as an input to ABAP Mapping.
    In Message Mapping, I have used standard RFC Lookup function to call a Function Module from ERP system. For using RFC Lookup function, I have created a Import Parameter of Category "Adapter", and Type "RFC" in the Signature Tab of Message Mapping.
    In Operation Mapping, I have specified both the mappings (that is., Message Mapping and ABAP Mapping).
    In Interface Determination, I have also assigned a value to the Importing Parameter.
    But whenever I trigger a message, it fails and gives message "The input-parameter Rec_RFC_ERP does not exist." (Rec_RFC_ERP is my Input Parameter name).
    When I am using only Message Mapping in Operation Mapping; it's working absolutely fine that means something needs to be done with ABAP Mapping.
    Any help will be highly appreciated.
    Regards,
    Varun

    Rec_RFC_ERP is this the name of your RFC lookup adapter?? Did you test your mapping in Design time using the RFCAdapter dropdown???
    Mapping Enhancement - RFC lookups in 7.1
    /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    Regards,
    Siva Maranani

  • Problem in using JOIN in code

    Hello ,
    there is one problem while using this select query :
    SELECT  a~vbeln vkorg audat auart a~netwr werks mwsbp INTO
                                           TABLE int_vbak
                                           FROM vbak AS a JOIN vbap AS b
                                           ON a~vbeln = b~vbeln
                                           FOR ALL ENTRIES IN int_auart
                                           WHERE auart EQ int_auart-low
                                           AND   vkorg IN s_vkorg
                                           AND   audat IN s_audat
                                           AND   werks IN s_werks
                                           AND   abgru EQ ' '.
    In VBAP table i have 10 records for particular vbeln but i am getting 9 only what could be the problem
    i have come across a scenerio when my vbeln and netwr are same at tht time it misses one record .
    Please help me to solve this issue so that i could get all the 10 records .
    Thanks Aryan

    Dear Aryan,
    SELECT  avbeln vkorg audat auart anetwr werks mwsbp INTO
                                           TABLE int_vbak
                                           FROM vbak AS a JOIN vbap AS b
                                           ON avbeln = bvbeln
                                           FOR ALL ENTRIES IN int_auart
                                           WHERE auart EQ int_auart-low
                                           AND   vkorg IN s_vkorg
                                           AND   audat IN s_audat
                                           AND   werks IN s_werks
                                           AND   abgru EQ ' '.
    In your code jsut check entries in for all entries table and values in the fields which you have used in your where condition.
    Hope this will help you to resolve your problem.
    Regards,
    Vijay

  • Using parameters in a select query sometimes not working

    I use parameters throughout my code - usually without problem, but for some reason in one case it does not return a result. When I modify the querystring to contain the value instead of using parameters it works. Is it because I'm secting a clob? or is it because I'm using a 9i ODP.net dll against a 10g database? this is c# 2.0
    here's the source code that does not work for me - REQUEST_DATA is a clob:
        public String loadRequest(String PSRNumber)
            String returnVal = null;
            ConnectionStringSettings connectionInfo = System.Configuration.ConfigurationManager.ConnectionStrings["Scribe"];
            OracleConnection myConnection = new OracleConnection();
            String strSQL = "select PSR, REQUEST_DATA from stats.request where PSR = :PSR";
            try
                myConnection.ConnectionString = connectionInfo.ConnectionString;
                OracleCommand cmd = new OracleCommand(strSQL, myConnection);
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add("PSR", OracleDbType.Varchar2).Value = PSRNumber;
                myConnection.Open();
                OracleDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                    returnVal = dr.GetOracleString(dr.GetOrdinal("REQUEST_DATA")).ToString();
                else
                    returnVal = null;
                dr.Dispose();
                cmd.Dispose();
            catch (OracleException ex)
                printError(ex.Message);
            finally
                myConnection.Close();
                myConnection.Dispose();
            return returnVal;
        }when I replace the line generating the sql, and remove the lines pertaining to parameters it works:
    String strSQL = String.Format("select PSR, REQUEST_DATA from stats.request where PSR = {0}", PSRNumber);
    I'm fine just using this as a workaround, but I need an explanation why the other does not work - I prefer to use parameters.
    Message was edited by:
    user633546

    I figured it out. thank you for your help in pointing me in the right direction.
    the problem was there was a trailing space in the data.
    when the data for that table is numeric for every record, the query allows me to leave out the single quotes. Trailing spaces do not seem to cause the database to see it as non-numeric - leaving out the quote still finds the record even if there is a trailing space.
    but when I put in the quote, it is not an exact string match, so it could not find the record. sometimes this flexibility gets me into trouble :\

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem in finding Exact result by using the following Query

    Hello,
    I am finding difficulty in producing the required result by using the following Query in Reports 6i
    (Note: - The query actual output and the required output are as follows: -)
    SELECT
    DISTINCT
    SH.S_HEAD_CODE,
    B.BILL_ID,
    B.SANCTION_DATE,
    E.EMP_NAME,
    E.EMP_DESIGNATION,
    B.TOTAL_BILL,
    NVL((SH.INITIAL_ALLOCATION-B.TOTAL_BILL), 0) BALANCE
    FROM BILL B, PARAMETERS P,SUB_HEAD SH, EMPLOYEES E, BILL_DETAIL BD
    WHERE
    SH.S_HEAD_CODE=B.S_HEAD_CODE
    AND B.S_HEAD_CODE=BD.S_HEAD_CODE
    AND B.EMP_ID_NO=E.EMP_ID_NO
    AND B.BILL_ID=BD.BILL_ID
    The Output of the above query is as follows: -
    Let say we have Total Amount Sanctioned Rs. 15,000,00/-
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853
    Saqib 2131 1497869
    Amir 6802 1493198
    Shafiq 1214 1498786
    Note:- In the above output the above query is subtracting the current balance from Total Sanctioned Amount (Rs. 1500000) each time, but
    it should actually subtract the current bill amount from the previous balance like the below said result.
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853 {Previous Balance - Current Bill Amount (1500000-7147) }........ The previous balance was actual amount Rs. 1500000
    Saqib 2131 1490722 {Previous Balance - Current Bill Amount (1492853 - 2131)}
    Amir 6802 1483920 {Previous Balance - Current Bill Amount (1490722 - 6802)}
    Shafiq 1214 1482706 {Previous Balance - Current Bill Amount (1483920 - 1214)}
    Results Continue...........................
    Please help me to solve this problem.
    Thank you in advance

    just check if this meets your requirements,
    SQL>
    SQL> With t As
      2  (
      3  Select 'Sohail' c1 ,7147 c2 ,1492853 c3 From dual Union All
      4  Select 'Saqib'   ,2131 ,1497869         From dual Union All
      5  Select 'Amir'    ,6802 ,1493198         From dual Union All
      6  Select 'Shafiq' ,1214 ,1498786          From dual
      7  )
      8  Select c1,
      9         c2,
    10         prv_amt - c2 current_amt
    11  From
    12  (
    13  Select c1,
    14         c2,
    15         c3,
    16         lag(c3,1,1500000) over(Order By c3) prv_amt
    17  From t
    18  );
    C1             C2 CURRENT_AMT
    Sohail       7147     1492853
    Amir         6802     1486051
    Saqib        2131     1491067
    Shafiq       1214     1496655
    SQL>

  • 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

  • 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"

  • BC4J List Validation from SQL Query, using parameters?

    When adding validation to a business component, one of the options for the list validation rule is 'Query Result'.
    is it possible to use parameters??. e.g. for a student type registration application
    validation on studentEntry that the course is availabe for the term entered would be like :-
    Select course from courseCat where term = :pterm
    where :pterm is the current term that the student has entered, this exists on the current studentEntry row.
    how would I code the parameter in the select statement in 'edit validation rule' screen?

    When adding validation to a business component, one of the options for the list validation rule is 'Query Result'.
    is it possible to use parameters??. e.g. for a student type registration application
    validation on studentEntry that the course is availabe for the term entered would be like :-
    Select course from courseCat where term = :pterm
    where :pterm is the current term that the student has entered, this exists on the current studentEntry row.
    how would I code the parameter in the select statement in 'edit validation rule' screen? This is currently not available on the built in validators. However you can create a custom-validation rule and perform such bind params and execute queries. We do have plans to support named paramters in queries that will allow us to enable this feature on validators as well.

  • Problems using Parameters

    Hi im trying to contribute documents on UCM using parameters because my legacy applications wont support webservice and because this can be the most simple way.
    Reading services documentation i found CHECKIN_UNIVERSAL
    If i use this url:
    http://localhost/idc/idcplg?IdcService=CHECKIN_UNIVERSAL&dSecurityGroup=Public&primaryFile=C:/test.txt&dDocAuthor=AUTOR&dDocTitle=TITLE
    I get this error message:
    Content item 'DEMO_000002' was not successfully checked in. The content item must have a primary file.
    I did exactly like the documentation.
    What`s missing?

    The check in services require an actual file as a payload along with the call. Simply using parameters in the url will not work for a check in. Unless you want to do a metadata only check in?
    In which case if your server is configured for that you can add this addtional parameter to your url: createPrimaryMetaFile=true
    Read More Here:
    [http://www.corecontentonly.com/2008/09/15/MetadataOnlyCheckIn.aspx|http://www.corecontentonly.com/2008/09/15/MetadataOnlyCheckIn.aspx]

Maybe you are looking for

  • Openshot and kdenlive render without sound

    Hi It has been a long time [a few months] since I have not used Kdenlive. When I rendered a movie with a mp3 sound track [ songs especially ] I got the film with this sound track. Now are occuring 2 things: The final movie is without sound [during th

  • Loading members to Essbase using ODI

    Hi All, We are planning to use ODI to load members from Oracle database to Essbase using ODI. Should we convert all the dimension tables in Oracle database to Parent-Child relation and then load it or can we use the existing hierarchial structure in

  • *MBP is hot topic*

    I see so many 2011 Macbook Pro heat issue threads, but no resolution of what is too hot. My question is: When I set up this laptop within the hour of unboxing it and run it under stress, what figure (in celcius) should I be on the look out for? In ot

  • IDOC ERROR 53

    Hi, We are getting error message in Inbound IDOC process, When we look into SM58 log there is an entry saying EDI: Table passed to EDI_SEGMENTS_ADD_BLOCK is empty.Can any one help us why this message comes ? There is no problem in IDOC creation progr

  • Unable to charge...what should I do....??!??!

    I have tried two different chargers on my mac... I think the port where you connect the charger to the computer is messed up.... I dont know what to do.. i bought the computer in 2010... Im sure there is most likely still a warranty.. but I dont even