Variable in the Queries

Hi people,
I would like to know if there is some table where I can find the variables used in a query.
Besides some table, if there is some practic way too.
Thank you,
Rosana.

To get the list of Variables, go to SE16 and query on the RSZELTDIR table with the following parameters:
OBJVERS (Object Version) = A
DRFTP (Query Element Type) = VAR
MAPNAME (Query Element Technical Name) <> blank
From there, go to SE37 and execute Function Module RRM_SV_VAR_WHERE_USED_LIST_GET. Use the value of the ELTUID from the query on RSZELTDIR and keep the default Object Version of A as the input parameters. The results will show the query or queries where the variable is used.

Similar Messages

  • Map the user exit variables with the queries/cubes using them

    Hello Friends,
    What are the post unicode conversion tests that you can perform on front end/existing queries?
    is there any added advantage for queries due to unicode?
    is testing the working of variable  enough? is there any table to map the user exit variables with the queries/cubes using them?
    Thanks
    Tanya

    Guys, any clue about this? Answer are appreciated.
    Thanks
    Tanya

  • Use of Variable - Refreshing the Queries in Workbook

    Hi All,
    I have a workbook which contains 5 Queries. All these queries uses the same variable. While I am refreshing all the  queries in the workbook, it pops-up the variable input screen 5 times.
    Here I just want the variable screen appear to be once and the same input be taken to all the queries.
    We are in 3.x.
    In 7.x Analyzer, I know that When you have multiple queries(with variables) embedded in a single workbook, we can use "Change Variables" icon to acheive the same.
    How can I achieve this in 3.5.
    Thanks in advance.
    Siva
    Edited by: Siva Reddy S on Jun 9, 2009 10:32 AM

    Hi Joke,
    Thanks for your reply.
    The option "save and reuse variable values" is something to do with the input values to save and reuse the same for the next time execution.
    Here I just wanted to input the variable at one query and the same value needs to be taken to all the queries. The Variable used in all the queries is the same one.
    Thanks again..
    Any body any inputs.
    Siva

  • How to delete the queries in  BW Production which are no longer existing.

    Hi,
    How to  delete the queries in BW production which are no longer existing in DEV.
    1. I tried Using RSZDELETE in Production it is not getting deleted and the below message given.
    Query object 4A7V83T3RB4ABIOKSDJT2HWDL is blocked. Deletion has been cancelled.
    2. I tried creating another query in dev with the same technical name and send a transport with deletion
    it is not working.
    Please advise me on this for any function module or any other method.
    Thanks
    Surya

    Hi,
    If you transported the query from DEV and now you want to delete it, you should open a BEx request (Dev Class under which it was originally transported -- or-- Standard - type) in DEV delete the query and move the transport to Production.
    As far as your error is concerned, usually  when you  can delete a query using the delete option in query designer itself,
    Business Explorer> query-> delete objects , when you press execute the system offers you a list of dependent objects on the query(workbook,views), in case the sysytem is unable to delete them i.e.they being used as a input query for a characteristic variable (replacement path),then system throws this error.You can delete these all depndents under there prescribed roles , fav s & then proceed.
    Hope this will be expedite.
    Thax & regards.
    Vaibhave Sharma

  • Use of Input Variables in SQL-Queries Sometimes Not Possible

    Only in simple SELECT-statements the use of input variables ([%0], [%1], etc.) work without problems.
    In more complex queries the use of these variables is not possible (e.g. SELECT-statements with sub-queries, sometimes when UNION is used - but I couldn't find any general rule when the problems will arise; sometimes two different queries with the same query-structure behave in different ways when these variables are used).
    In these cases the query is not executed - not even the input-window to enter values into the input variables is displayed. The query stops with some strange error-messages in the status line. These error-messages doesn't have any relation to the actual query - sometimes it refers to field-names never used in the query or refers to syntax error which do not exist.
    If the input variables are replaced by constant values there are no problems so there can't be any syntax errors - the only difference is the presence or absence of input variables.
    Example:
      provided that the queries have a certain complexity
      SELECT ...
      FROM   ... OINV Tx ...
      WHERE  ... Tx.DocDate >= [%0] ...
      does not work,
      SELECT ...
      FROM   ... OINV Tx ...
      WHERE  ... Tx.DocDate >= '1.1.2007' ...
      works!
    Does anybody have run into the same problem and now if it is a bug of SAP-BO or an error on behalf of the user? Does anybody know a way to correct the problem?
    Thanks in advance!
    Frank
    By the way: Are there any rules where exactly input variables can be used in a query?
    Only in SELECT-statements? Where there exactly?
    In statements outside of SELECT?

    Only SAP Partners Can access service.sap.com/notes, but I think it is possible to search in them from the customer portal as well.
    Here are summary of the two notes mentioned before this:
    730960:
    <i>
    The following query is an example for how to define variables in long
    queries rather than using "Fixed Declares".
    You need to use exactly the same template as follows, do not delete
    "comments" from this query.
    The only changes you need to do :
    1. In the first and in the fifth rows you need to select the table to which you would like to relate the variable e.g. in this example, the variable is related to the table VPM1 - 'Payments to Vendors - Rows'.
    2. In the fourth and in the eighth rows you need to select the field to which you would like to define the variables e.g. in this example, the variable is the field 'DueDate'.
    /SELECT FROM [dbo].[VPM1] T0/
    declare  @fromdate as datetime
    /* WHERE */
    set @fromdate = /* T0.DueDate */ '[%0]'
    /SELECT FROM [dbo].[VPM1] T1/
    declare  @tilldate as datetime
    /* WHERE */
    set @tilldate = /* T0.DueDate */ '[%1]'
    select  OVPM.docnum, VPM1.dueDate,VPM1.CheckNum, VPM1.Branch,
    VPM1.BankCode, VPM1.CheckSum, OVPM.CardName,
    case
    when OPCH.docnum is null then VPM2.docEntry
    else OPCH.docnum
    end as 'docnum'
    from OVPM INNER join VPM1 on OVPM.docnum = VPM1.docnum
    left join  VPM2 LEFT JOIN OPCH ON VPM2.DocEntry = OPCH.DocEntry
    on OVPM.docnum = VPM2.docnum
    where OVPM.Canceled = 'N' AND VPM1.DueDate >=@fromdate AND
    VPM1.DueDate <=@tilldate
    </i>
    955295:
    <i>
    Using SAP Business One Survey Variables (parameters) in a 'Set' SQL Statement can give an error in the Query Generator.
    For Example:
    Declare @Num as numeric(2)
    Set @Num = [%0]
    Select T0.DocNum
    From ORDR T0
    Where DocNum = @Num
    Other terms
    query, SQL, parameter, survey, variable, query generator, set, declare, [%0], table, error, SAP Business One
    Reason and Prerequisites
    FAQ
    Solution
    In such cases you need to put in an SQL remark statement a reference field in the DB for the Survey Variable (any field).
    For Example: (to make the above query work)
    Declare @Num as numeric(2)
    Set @Num = /* T0.DocNum */ [%0]
    Select T0.DocNum
    From ORDR T0
    Where docnum = @Num
    </i>

  • Variable in the Cursor definition?

    Shall we provide a variable in the cursor definition.? Like this,
    CREATE OR REPLACE PROCEDURE PRC_PROCEURE1 (v_table in varchar2) IS
    CURSOR C1 IS select COL1,COL2,COL3 from V_TABLE
    where ......
    order by 1 asc
    Getting the error :table or view does not exists. Please help

    You can only bind values into your queries, not object names, so NO, you can't use a variable as a table name like that.
    The only way to do that would be to write dynamic SQL, but that should raise the question as to why you need dynamic table names? Do you not know the table name at design time? Why not?

  • How to create selection variables on the KF

    Hi,
        i need to create a variable on the CKF and the user is going to give the selections like >90% or <100%  in the variable screen before runing the report.on the report should show the values based on the selection.
    1.how to create the variables on the CKF.
    2. how to restrict the values and give the selections(like >90%,<100%) values in the selections.

    Hi Venkat,
    You can achieve this by the following way:
    1. Create a CKF or a local formula(based on which queries it needs to be used)
    2. Then go to BEX Query Designer -> View -> Conditions
    3. Create New Condition -> select 'New' -> Select your CKF/Local Formula -> Define your Operator ( BT, GT, LT, Top % etc.) -> Create a Formula variable (Ready for input with Processing type as ;manual Input')
    4. DO the char. assignement for the condition with your condition definition
    4. Execute the report with your values.
    This will solve your prob.
    Cheers,
    VA

  • Writing a Stored Proc which will execute the Queries passed to it as args

    Hi,
    I need to write a Stored Proc which gets the Query to be executed as an Argument and return the results in an OUT Variable.
    The Stored Proc i wrote is
    CREATE OR REPLACE PROCEDURE SP_FETCH_RESULTS(l_query in varchar2,
    l_returnValue out clob )
    is
    l_output utl_file.file_type;
    l_theCursor integer ;
    l_columnValue clob;
    l_status integer;
    l_results      clob;
    begin
    l_theCursor := dbms_sql.open_cursor;
    -- Parse the Query
    dbms_sql.parse( l_theCursor, ':x', dbms_sql.native );
    DBMS_SQL.BIND_VARIABLE(l_theCursor, ':x', l_query);
    -- Define the coulmnValue Variables
    dbms_sql.define_column( l_theCursor, 1, l_columnValue);
    -- Execute the Query
    l_status := dbms_sql.execute(l_theCursor);
    -- Get the Results and prepare the return Value.
    loop
    exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
    dbms_sql.column_value( l_theCursor, 1, l_columnValue );
         DBMS_LOB.APPEND(l_returnValue, l_columnValue);
    end loop;
    -- Close the Cursor
    dbms_sql.close_cursor(l_theCursor);
    end SP_FETCH_RESULTS;
    As the Queries paased to it always return CLOB Types i declared the OUT Variable as CLOB
    And when i try to execute is using the below given PL/SQL Block
    DECLARE
    l_Query CLOB ;
    l_retVal CLOB;
    l_results CLOB;
    BEGIN
    l_Query:='SELECT extract(object_value,''/AC'').getStringVal() into l_results from CommonAssetCatalog';
    SP_FETCH_RESULTS(l_Query,l_retVal);
    dbms_output.put_line ('Results =');
    END;
    I am getting the Error.
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 906
    ORA-06512: at "SYS.DBMS_SQL", line 39
    ORA-06512: at "WEBLOGIC.SP_FETCH_RESULTS", line 13
    ORA-06512: at line 7
    Could you guys pls give me some inputs on how to resolve this..
    Thanks a lot
    Sateesh

    Hi James,
    I tried with out the Bind Variable and got the Same Error..
    The Code which i tried earlier is
    CREATE OR REPLACE PROCEDURE SP_FETCH_RESULTS(l_query in varchar2,
    l_returnValue out clob )
    is
    l_output utl_file.file_type;
    l_theCursor integer ;
    l_columnValue clob;
    l_status integer;
    l_results      clob;
    begin
    l_theCursor := dbms_sql.open_cursor;
    -- Parse the Query
    dbms_sql.parse( l_theCursor, l_query, dbms_sql.native );
    --DBMS_SQL.BIND_VARIABLE(l_theCursor, ':x', l_query);
    -- Define the coulmnValue Variables
    dbms_sql.define_column( l_theCursor, 1, l_columnValue);
    -- Execute the Query
    l_status := dbms_sql.execute(l_theCursor);
    -- Get the Results and prepare the return Value.
    loop
    exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
    dbms_sql.column_value( l_theCursor, 1, l_columnValue );
         DBMS_LOB.APPEND(l_returnValue, l_columnValue);
    end loop;
    -- Close the Cursor
    dbms_sql.close_cursor(l_theCursor);
    end SP_FETCH_RESULTS;
    and the Procedure got Compiled Successfully and when i ran the PL/SQL Block which calls the Above Stored Proc i got the Error
    DECLARE
    ERROR at line 1:
    ORA-00905: missing keyword
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 906
    ORA-06512: at "SYS.DBMS_SQL", line 39
    ORA-06512: at "WEBLOGIC.SP_FETCH_RESULTS", line 13
    ORA-06512: at line 7
    Pls let me know how can i resolve this..
    Thanks
    Sateesh

  • How to change Global variable in the query

    Hi,
    I have 6 reports which is using 0PDT as a global variable and has single option as a property. Now I want to change this property and have multiple selection but I am not able to change its property.
    I am able to see all the filter variables from the query property and from there I am getting edit option to change but the "single selection" option is grey/disable which is preventing me to make change in this variable. Is there any way that I delete this variable and create a local variable which has date range option.
    This is affecting all my reports and all the report needs date ranges instead of single select option.
    Thanks,
    Shivani

    Shivani,
        You can change the restrictions with new variable(right click on required infoobject and choose restrict -->> choose variables -->> move existing variable from right to left and move  new variable. Then you can see only one variable.
    You can not delete any variable if is using in some queries.
    how to restrict:
    Srini<a href="http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm">Restricting Characteristics</a>

  • Providing access to Variables in the Query Designer

    Greetings experts and fellow consultants,
    I have a simple question, did a search and did not come up with much of an answer.  Currently, we have a system with a role for BI Power Users in order for them to create ad-hoc queries.  An issue we found was that these power users were not able to view variables within the query designer:
    Under the "Characteristic Restrictions" pane, the variables show up as (Display Not Allowed) under their associated InfoObjects.  This is presenting an issue (understandably) and I would like to provide access for these power users to see the variables.
    My question is, are there any circumstances where I would want to restrict which variables are shown to the power user?  Right now, I plan to allow display access to all variables (via S_RS_COMP+S_RS_COMP1 for those informed on Security).  Just trying to brainstorm on whether there might be scenerios where I would want to hide certain variables.
    Many thanks to all opinions, as always!

    Suresh, in my above post I knew how to enable this.  I just wanted to know in regards to security whether there were any exposures.  Apparently, I could not find any and the changes went through without issue.  The way you enable display of variables in the Query Designer is the following:
    S_RS_COMP:
    RSINFOAREA '*'
    RSINFOCUBE '*'
    RSZCOMPTP 'VAR'
    ACTVT '03'
    S_RS_COMP1:
    RSZCOMPTP 'VAR'
    RSZCOMPID '*'
    RSZOWNER '*'
    ACTVT '03'
    Hope this helps.  Of course, adjust the field values are you see fit but the minimum requirement is that RSZCOMOPTP 'VAR' (Variables) and ACTVT '03' (Display).

  • Filetring and Variables in the multiple tab Template result

    Gurus!
    I have a strange problem in one of my template. I have four queries and four tabs for each in one of my Web Template. I use a jump command in between queries to switch tabs . Its RRI= X, and when I do this the executed result I have a strange problem. For any variable selection the report works fine. But only for a variable with the hierarchy selection, the result filters on many characteriestic elements and selects some selected (on its own) elements under that Hierarchy and displays the result when I switch tabs.
    I think it may have something to do with the dynamic  filtering of the Presentation Hierarchy by using the jump. But i am not able to figure out the problem and need to understand the reason behind this. If someone of you have even a little bit of information will be helpful

    Hi Khaja,
    thanks for the quick response.
    I checked the query properties. The order is already
    1. Month
    2. BY 1
    3. BY2
    4. BY3
    Somehow the the exchange date is between 2 and 3 - the exchange date is not a normal variable it is used by the SAP currency conversion (variable).
    Does somebody has an idea how to change the order, so that the exchange date is not between my BY's?
    Thanks,
    Michael

  • Description input variable dependent by queries

    Hi gurus,
    I have a input variable in more queries bex (bi 7.0).
    I do to change description for only one query without to create an other custom variable and replace it where I need.
    I test in cmod with the support the second customer exit variable but when  I launch the query I don't intercept the description variable (insert in table RSZELTTXT) in step 1.
    Any suggest..
    thanks a lot
    Andrea
    Edited by: andreapistore on Feb 3, 2011 2:32 PM
    Edited by: andreapistore on Feb 3, 2011 2:44 PM

    Hi
    In the restriction of AS1 you restrict on current quarter (SAP Variable -> Current quarter  0CQUART if not found see Business content -> Query element -> variables)
    Then you do a right mouse click an set the variable offset on -3
    The same for AS2 with -2; AS3 with -1
    on AS4 you don't do an offset.
    Next to the description of the restricted key figure there is a button for Text variables (Current quarter (T) 0CQUARTT ).
    Udo

  • To determine the Queries which uses Berfore Aggregation

    Hi,
    Is there any best way to determine the Queries which uses Berfore Aggregation properies like any table which has information of all the calculated key figures which uses Before aggregation properties.
    Otherwise how can we determine the same using RSRT.
    Please help.
    Thanks
    Bhanukiran

    Hi,
    Below listed are the tables related to queries. See if you get this information in any one of those...
    RSZELTDIR     Directory of the reporting component elements
    RSZELTTXT     Texts of reporting component elements
    RSZELTXREF     Directory of query element references
    RSRREPDIR     Directory of all reports (Query GENUNIID)
    RSZCOMPDIR     Directory of reporting components
    RSZRANGE     Selection specification for an element
    RSZSELECT     Selection properties of an element
    RSZELTDIR     Directory of the reporting component elements
    RSZCOMPIC     Assignment reuseable component <-> InfoCube
    RSZELTPRIO     Priorities with element collisions
    RSZELTPROP     Element properties (settings)
    RSZELTATTR     Attribute selection per dimension element
    RSZCALC     Definition of a formula element
    RSZCEL     Query Designer: Directory of Cells
    RSZGLOBV     Global Variables in Reporting
    Regards,
    Yogesh

  • Bind variables improve the performence of  query??

    Hi,
    Bind variables improve the performence of program or SQL Query.
    Select empno,ename,sal from emp where empno=:eno;
    select sal into :vno from emp;
    According to these queries i am asking performence of bind variables to learn more from you.
    Regards,
    Venkat.
    Edited by: Venkata2 on Sep 16, 2008 6:40 PM

    Karthick_Arp wrote:
    any variable inside a stored procedure is a bind variable.
    using bind variables can help you avoid hard parse. which leads to performance improvement.
    Well, you mentioned pros and I will mention cons. Since bind variable value is not known until execution time optimizer can not select best plan. So Oracle introduced bind variable peeking where plan is deferred until first execution. With bind variable peeking optimizer costructs plan using bind variable values at the first execution. However, if first execution has "not typical" bind variable values we end up with sub-optimal plan.
    SY.
    P.S. Please do not consider my reply as "we should not use bind variables".

  • Send email from workflow using a variable in the to field in SharePoint Online (Office 365)

    I have a simple sharepoint workflow that sends and email to users.  I know that the mail portion works because I can put a user's email address in the to: field and it sends fine.  If I use a string variable with the email address, I get a workflow
    error.
    Simple steps to repro for me:
    Create a new workflow in SPD  (I have tried a list workflow and site workflow)
    Create a workflow variable named email.
    Set the variable to an email address where the user is in the site
    Send email and do a variable lookup to the email variable just set.
    The workflow just hangs in this scenario
    I do get an error:
    Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP BadRequest to https://[tenant].sharepoint.com/_api/sp.utilities.utility.SendEmail
    Correlation Id: 568e9c68-ea75-d057-ab9f-d86f6cae3021 Instance Id: 9cc721a4-78e6-456f-812b-67351dfc9710
    The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.
    Retry now

    Simple answer... When I used the variable, I marked it as a string.  There is an email address setting.

Maybe you are looking for

  • Sub contracting Process ( MTO)

    Dear All, One of the my client using Sub contractig process MTO.Defined process like 1. Create process order based on Sales order  ( Auto PR generate) 2. Sub contracting purchase order creation agaisnt PR 3. Material consumption againt 261 Movement 4

  • How can I get a boot-disk for a Compaq P2500 laptop Windows XP Home Edition?

    I'm already in another forum with a eerily similar question, but that's for the HP Media Center Pavilion m8000e desktop system (Windows Vista Home Premium) I was just given; I've ordered a new hard drive for that. I assume the directions to create a

  • Fixed layout Epubs versus PDF!

    I have this niggling thought that I can't seem to shake off, so I'll air it out here: What is the difference between a fixed-layout ePub and a PDF? I mean, what is the intrinsic difference? Isn't a PDF precisely a fixed-layout ePub, only better? A PD

  • Aup+device registration

    Hi All, The requirement is to have a corporate user go through the guest portal to register the device and accept the AUP to get full access. We tested with a guest portal with AUP enabled but device registration page desent appear and once AUP is ac

  • Add Contacts to Skype Manager members accounts (Contact List)

    Hi All, I tried to disucuss this over live chat but had no luck as the tech guy kept asking if I wanted to add Skype credit for voice calls :-/ Basically what im asking for help with is if its possible to create group in Skype Manager, Create account