Creating variables to a query

i have a existing query which is created one week back.Now i want to create  variables for that query.but while opening that query it is directly going to Result area(Excel sheet).how to create  variables.can any body throw light on this .
Thanx in advance.

Hi,
if you only want to create a variable just look here:
http://help.sap.com/saphelp_bw33/helpdata/en/f1/0a56a7e09411d2acb90000e829fbfe/content.htm
and here
http://help.sap.com/saphelp_bw33/helpdata/en/ac/789b3c4d4d8d15e10000000a114084/content.htm
Regards,
A. Baykal

Similar Messages

  • How to create variables in Bex query

    Hi all,
    can anyone please explain how to create the variables and how many types of variables in Bex Query.
    Thanks in advance
    James

    Hi James,
    You can create variables in the BEx Query by right clicking on your characteristic and then selecting Restrict. A pop up window will appear. On the left side of the pop-up window, right click on a white space and then select New Variable. The Variable Wizard will then appear - you can now create your variable acording to your specifications. For more info on variables, please click on the link below:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56a7e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/61/579b3c494d8e15e10000000a114084/content.htm
    Hope this helps,
    Juice

  • Create new variable in a query using if

    Is it possible to create a new variable in a query based on an if statement.
    eg select A, B, C from table where condition
    C is the new variable and should have a value of 10 if A is > 100 and a value of one if A > 100 and B < 200 for example.

    Yes. Why not.
    select a,
             b,
             case
                 when a> 100 then
                    10
                 when a> 100 and b<200 then
                   1
              end c
    from table
    where <condition>;Regards.
    Satyaki De.

  • How to create Text Variables in BEx Query Designer

    How  can i create Text Variables in Bex Q.D.
    I am able to create characteristic variables
    but i can't find option to create text variables.
    What's the requirement to create Text variables in Bex Q.D.
    When i try to create Text variable for 0calDay.. the variable type is characteristic by Default and disabled.
    How can i create text variables related to 0CalDay with which i need to work in Customer Exit.

    Hi,
    You have to create characteristic variable processing by Customer Exit by considering 0CalDay as a Reference Characteristic
    After creation of the above variable, you restrict your KF with the above created variable.
    Now you can create a Text variable for the description of your KF. This way it works...........
    Regards,
    Suman

  • How can I use a variable in webi query filter

    I created a webi report using the fiscal year/month(period) field as a filter to show a window of 18 periods.  The report works just as requested using a between filter on fiscal period with prompts for both the start and ending periods.  Now I'd like to calculate the start period based on what was entered in the prompt for the ending period (e.g. enter 201106 for the TO prompt on the between statement and have the FROM statement filled in as 201001.)  I can create variables in the report to display both the user response to the ending period prompt and the calculated starting period, but I cannot figure out how to incorporate that calculated starting date into the FROM side of the between query filter.
    Any suggestions? 
    Thanks,
    Doug
    Sorry I got my froms and to's mixed up in the first draft. Edited by: Doug Roswold on Mar 4, 2011 6:27 PM

    Let me understand what you want to do.  You don't want to use two prompts, just one, insn't it?
    I mean, instead of:
    Filter area:
    Date between "From prompt" to "To Prompt"
    You want something like:.
    Filter area:
    Date between Variable  to "To Prompt"
    if I'm not wrong that's not possible to achieve in Webi Query  Panel.
    Can you modify your universe? The only way to achieve it is modifying your universe, creating your formula in the universe and assigning it to an object, so you can use this new object in your filter area like this:
    Date between MyUniverseObject  to "To Prompt"
    Edited by: PadawanGirl on Mar 4, 2011 8:15 PM

  • How to create variable in BEx on a Nav Attribute?

    Hi All,
    We are creating a report on Master data object 0MILESTONE. 0PROJECT is the navigational attribute of 0milestone.
    and ZSTATUS is the navigational attribute of 0PROJECT.
    Requirement is to create variable on ZSTATUS in BEx. How do I do that? I dont see option of creating variable on Nav attribute of a Nav attribute.
    Regards,
    Bob

    Hi,
    There is nothing as such creating variable for navigation attribute. You can only create variable directly on particular infoobject.
    In your case you are using transitivie attributes. So they can not be accesed directly in BEX query. You can only use 1st level nagivation attributes in bex query.
    [http://help.sap.com/saphelp_nw04/helpdata/en/6f/c7553bb1c0b562e10000000a11402f/content.htm]
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Feb 22, 2012 3:53 PM

  • How to create variables in payroll rules

    Hi Experts,
    Can you please let me know how to create variables in payroll rules and how to assign values to them.
    Please share some documentation on this topic.
    Thanks so much,
    Uttama

    Hi Vijay,
    Variables can be created for -
    Char Values
    Texts
    Formula elements
    hierarchy and its nodes
    For Characteristic Values -
    These are used to be filled by user in the query selection screen
    1.In the filter tab of QD, select the characteristic for which you want to create a variable,right click - >Restrict
    2.Select variabes from drop down
    3.Click Create new variable and then define its properties like "Processing By",Settings in Details tab etc and save it
    4.Move it to the right side and click ok
    Now you have created a variable and used it as a placeholder for that characteristic for which user can enter the value to act as dyanmic entry.
    Regards,
    Vineeth

  • Creating variables in BO using BO SDK

    Hi,
    We can create variables which can be formulas applied on objects using infoview.
    Is there any way, these variables can be created using java BO SDK?
    Please paste some sample code for us.
    Cheers,
    Shruti

    Please find below a snippet code based on java managed RAS api that adds a formula onto the report. I hope this answer your question.
    <%@ include file="logon.jsp"%>
    <%
        ReportClientDocument oReportClientDocument;
        IReportAppFactory oReportAppFactory;
        IInfoObjects oInfoObjects=null;
         IInfoObject oInfoObject=null;
         String reportName = "SimpleRCAPIReport.rpt";
        // Retrieve report to be modified
        oInfoObjects = iStore.query("Select * from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0 and SI_NAME = '" + reportName + "'");
         oReportAppFactory = (IReportAppFactory)es.getService("", "RASReportService");
         oReportClientDocument = oReportAppFactory.openDocument((IInfoObject)oInfoObjects.get(0), 0, java.util.Locale.ENGLISH);
         // First create the formula field
         FormulaField newFormulaField = new FormulaField();
         //  Set the parameters (assume it's a string and Crystal Syntax)
        newFormulaField.setText("{Customer.Contact First Name} + ' ' + {Customer.Contact Last Name}");
        newFormulaField.setName("CustomerName");
        newFormulaField.setSyntax(FormulaSyntax.crystal);
        newFormulaField.setType(FieldValueType.stringField);
        // Now add it to the report
        oReportClientDocument.getDataDefController().getFormulaFieldController().add(newFormulaField);
         // Now that the formula has been created, add the newly created formula to the report
         // First determine which section to add the formula field to - in this case the details section
         ISection sectionToAddTo = oReportClientDocument.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0);
         // Get back all the formulafields in the report
         Fields formulaFields = oReportClientDocument.getDataDefController().getDataDefinition().getFormulaFields();
         int formulaFieldIndex = formulaFields.find("{@CustomerName}", FieldDisplayNameType.formulaName, java.util.Locale.ENGLISH);
         Field formulaField = (Field)formulaFields.getField(formulaFieldIndex);
         // Set the type of field this is
         formulaField.setType(FieldValueType.stringField);
         // Now create a new Field object which will be added to the report
         FieldObject oFieldObject = new FieldObject();
         // Set the datasource of this field object to the formula form of the above Database Field Object
         oFieldObject.setDataSourceName(formulaField.getFormulaForm());
         oFieldObject.setFieldValueType(formulaField.getType());
         // Now set the co-ordinates of where the field will go
         oFieldObject.setLeft(8000);
         oFieldObject.setTop(1);
         oFieldObject.setWidth(1911);
         oFieldObject.setHeight(226);
         // And finally Add it to the report
         oReportClientDocument.getReportDefController().getReportObjectController().add(oFieldObject, sectionToAddTo, -1);
         // Now display the report
       session.setAttribute("reportSource", oReportClientDocument.getReportSource());
       response.sendRedirect("CrystalReportViewer.jsp");
    %>
    Cheers
    Alphonse

  • System variable in a query

    Hi,
    I would like to use a system variable in a query in the where clause. How can i use it?
    Thanks in advance:
    Bianca

    Hi,
    840275 wrote:
    Several scripts need to use the same value so i have created a system variable for it.
    (some of these scripts are in oracle, some in Talend)
    select...
    from myTable
    where myColumn = mySystemVariable:
    Tha question is how can i reference a system variable from a query?
    Depending on exactly what you mean, the code you posted will work; just fill in the columns you want in place of "...".
    If I don't know where you're starting from, and I don't know where you want to go, then I can't give you very precise directions.
    Explain what you're trying to do.  Remember, the people who want to help you don't know what environment you're working in (e.g., SQL*Plus, PL/SQL, Apex, ...), they don't know anything about your application, and they don't exactly what you want.  The more you help them, the more they can help you.
    Why not post a question that really explains what you need to do?  For example: "I have a table like scott.emp, that has multiple departments.  Users will always be interested in only 1 departement at a time.  I would like them to run standard, fixed queries, such as ... but have the results only apply to the department they are interested in, as if they had executed ...  Several users may be on the system at the same time, and they won't necessarily be interested in the same department.  I'm doing this in SQL*Plus now, but I may want to do something similar in Apex.  My Orace version is ...".

  • Problem with customer exit variable in BeX Query

    Hi All,
    We have created a customer exit variable in a query and populated with few patterns in customer exit.
    My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
    It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
    For example: Pattern passed in customer exit = 'HOSPITAL'
    The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
    I would appreciate your help on this.
    Regards,
    Rakesh

    Hi Diogo,
    Below is the code I am using in the customer exit.
    SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
          IF sy-subrc = 0.
            LOOP AT gt_pbuild INTO gs_pbuild.
              CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
              ls_range-low = lv_pattern.
              ls_range-sign = lc_sign_i.
              ls_range-opt = 'CP'.
              APPEND ls_range TO e_t_range.
              CLEAR: ls_range,
                     lv_pattern.
            ENDLOOP.
          ENDIF.
         ENDIF.
    I have tried using '%' instead of '*' aswell but the result is same.
    Thanks,
    Rakesh

  • How to create variable in areport

    Hi all ,
    I am using fr_studio for creating reports.Can anyone tell me how to create variable in the report?

    Hi,
    There is nothing as such creating variable for navigation attribute. You can only create variable directly on particular infoobject.
    In your case you are using transitivie attributes. So they can not be accesed directly in BEX query. You can only use 1st level nagivation attributes in bex query.
    [http://help.sap.com/saphelp_nw04/helpdata/en/6f/c7553bb1c0b562e10000000a11402f/content.htm]
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Feb 22, 2012 3:53 PM

  • How can I create variant of control query?

    Dear Expert,
    I am using BEx Broadcaster to bradcast query as a report.
    In tab Filter Navigation, I enter the control query, but the variant always gives me "(No Selection Possible)".
    How can I create variant of control query?
    I try to create variant via variable entry page when I excute my query.
    The variable show in table "RSRPARAMETRIZA" but not show in BEx Braodcaster.
    Thank you,
    Zilla

    Hello,
    Please run this control query on the portal and then save variant you require. If you want this variant to be available
    to all users make sure that the user specific flag is unchecked while saving the variant.
    Regards,
    Michael

  • Variable of copied Query changes the original  Query - variable

    Team:
    I have a Query "A". Then, I made a copy "B". Both Queries are the same definition, including the variables. In the Query A, there is a variable "ZWWW" that checks the date entered by the user. In the user exit I_step = 3, we check for the validity of the date entered. Unfortunately, we need to test the Query in QAS, which  we do not need to test the validity of the data. Thus, we changed the variable to be "YYYYY" on the Query B.
    Unfortunately, this new variable "YYYY" somehow is reflected automatically in the original Query A. This issue is only present if the Query B is a copy of Query A. Basically, the Query A and B have different technical names and UIDs. However, they are in the background related.
    The question is: how can I change the variable on Query B without affecting Query A.

    Hi Raul,
    Variables are at
    Query Filter Level
    RKF Level..which is Global
    What i understand is that this Variable of Query is in the RKF - which is GLOBAL.So if we change the RKF Variable on that Multiprovider... for not just Query A... ...it will change across all the Queries not just Query A or B.
    We will have to identify the RKF1 and create a copy of the RKF1 as New RKF2 and replace the old Variable with the New One YYYY.
    Hope this Clarifies.
    rgds
    SVU

  • 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).

Maybe you are looking for

  • Reg: sales organization

    Hi all,            i have two queries 1) what is the use of maintaining more than one sales organization in only domestic sale.? 2) can we interchange the sales organization , for example          2000               is for  Andhra pradesh          30

  • Picking list output in VL70 for the outbound deliveries picked via WM

    Hi Experts ,           How to take Picking list output in VL70 for the outbound deliveries picked through transfer Orde(WM). Generally, we ll genreate picking list in VL70 directly giving from the outbound delivery. Then , system wll confirm the Pick

  • Error in Data service while executing Rapidmart

    Dear all i am getting the following error : (12.2) 06-29-11 02:35:13 (E) (3132:7104) DBS-070401: |Session Cost_Center_Load_SAP ODBC data source <FGHSRV018> error message for operation <SQLExecute>: <MicrosoftODBC SQL Server DriverSQL ServerInvalid co

  • Blocking Inbound File Attachments

    Hi, Currently, we are upgrading our email firewall from Borderware to Cisco C160 Ironport.  I have loaded the config file and am now in the process of setting up/configuring policies, content filter.  I want to block certain inbound attachments such

  • Sequence Preview codec settings - Premiere Next question

    Since Premiere Next adds full support for MXF DNxHD, will this be availabe as a preview codec to render timeline previews to?