Using Variables in WAD

Hi gurus
I have created variables for Calender Year and posting periods for the value ranging from and to. Now i have created a web template for this query and i want to see the variables in my web template.
Please can anyone tell me how to do this.
regards
vijyakumar

hi vijaykumar
   when u open the WAD u find a new template. On the left hand corner u find properties under which u have 2 tabs generic and web item. under web item u have the option force variable screen.
Drag the web item u want to display onto the new template. Now u can see the properties of that web item in the left hand corner. there u have two types of properties. Specific and general. under specific u find the properties u are looking for.
hope i m clear this time.
thanks
sairam

Similar Messages

  • Dynamic URL Configuration using variable range - WAD

    Hi,
    I am trying to configure a URL dynamically using variable range values. There are two variables which I pass to the URL, Sales Document Number and Posting Date. Sales Document Number has a single value and Posting Date is a range variable. The single value for sales document is passed to the URL but the date range is not passed and hence the web template gets the blank value for the date and shows the variable screen as this is mandatory. The URL is as follows.
    CONCATENATE
    l_web_protocol
    l_portal_server
    Initial URL
    '/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='
    l_web_template
    '&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE'
    '&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING'
    '&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING='
    l_var_value  "variable value
    '&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE='
    l_var_name   "Variable for info object
    '&BI_COMMAND_2-BI_COMMAND_TYPE=SET_SELECTION_STATE_SIMPLE'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR=INTERVAL_SELECTION'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-ATTRIBUTE_MEMBER_SELECTION-
    INFO_OBJECT=0PSTNG_DATE'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER=MEMBERS_EXIT'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-MEMBERS_EXIT='
    l_range_var_name  "Customer Exit Variable
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-MEMBER_NAME='
    l_range-low     "Variable Value - Low
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-ATTRIBUTE_MEMBER_SELECTION- INFO_OBJECT=0PSTNG_DATE'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER=MEMBERS_EXIT'
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-MEMBERS_EXIT='
    l_range_var_name     "Customer Exit Variable
    '&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-MEMBER_NAME='
    l_range-high      "Variable Value - High
    '&BI_COMMAND_2-RANGE_SELECTION_SIGN=INCLUDING'
    '&BI_COMMAND_2-TARGET_DATA_PROVIDER_REF_LIST=DP_TAB'      "Tab in the Web Template
    into  l_url.
    Can someone tell me asto what's going wrong with this URL? I passed single value for Posting Date and it worked fine.
    Thanks and Regards,
    Arya

    Thanks for the reply. However I did not understand couple of things. Should I try the URL like below?
    BI_COMMAND=&
    BI_COMMAND-TARGET_DIALOG_REF=l_var_name&
    BI_COMMAND-BI_ADVANCED=DLG_VARIABLE_vsc_DropdownVariants& "Which value to be passed?
    BI_COMMAND-BI_COMMAND_TYPE=PASSIVE_VALUE_TRANSFER&  "Which value to be passed?
    BI_COMMAND-PASSIVE_ID=DLG_VARIABLE_vsc_DropdownVariants_combobox& "Which value to be passed?
    BI_COMMAND-PASSIVE_VALUE=l_var_value&
    BI_COMMAND_1=&
    BI_COMMAND_1-TARGET_DIALOG_REF=l_range_var_name&
    BI_COMMAND_1-BI_ADVANCED=DLG_VARIABLE_vsc_CommonVariablesList_VAR_1_VARINPUT& "Which value to be passed?
    BI_COMMAND_1-BI_COMMAND_TYPE=PASSIVE_VALUE_TRANSFER&
    BI_COMMAND_1-PASSIVE_ID=DLG_VARIABLE_vsc_CommonVariablesList_VAR_1_VARINPUT_inp& "Which value to be passed?
    BI_COMMAND_1-PASSIVE_VALUE=l_range_low-l_range_high&
    BI_COMMAND_2=&
    BI_COMMAND_2-TARGET_DIALOG_REF=l_range_var_name&
    BI_COMMAND_2-BI_COMMAND_TYPE=OK
    Thanks and Regars,
    Arya

  • Using variables on WAD

    Dear Friends,
    I am trying to create a small applicaion using WAD.
    i inserted one Drop down web item in my template and associate that
    drop down web item with variable of my datasource. variable is year
    Now when i run my template my drop down is showing year values like this.
    2008, Number of Days: 365 , Number of workdays; 248, valid from; 01.01.2008, valid to: 31.12.2008
    2009, Number of Days: 366 , Number of workdays; 251, valid from; 01.01.2009, valid to: 31.12.2009
    but i would like to show only values
    2008
    2008
    where to set this thing on WAD.
    regards,
    Malik

    Dea Arun,
    We are using
    Business Explorer Web Application Designer
    BI AddOn 7.x ( Based on 7.10)
    support package 8
    Revision 475
    Thanks with regards,
    Malik

  • Using javascript to read bex variables in WAD

    Hello,
    I'm using BI 7.0.
    In Query Designer I defined a variable of type customer exit. The variable is called "TESTVAR". How can I access to the value of this variable in WAD by using javascript? I know I can use the Web Item "Script" or I can include the javascript code in an external file. But can you can give me some example code how I can access the variable "TESTVAR"?
    thanks
    bertl

    Try using the following
    Suppose <b>TESTVAR</b> is having the value <b>A</b>
    If TESTVAR is single value
    var_name_1=TESTVAR
    VAR_VALUE_EXT_1 = A
    if TESTVAR is range
    var_name_1=TESTVAR
    VAR_VALUE_LOW_EXT_1 = A
    VAR_VALUE_HIGH_EXT_1 = A

  • Store dropdown value in a variable in WAD

    Hi,
    I would like to pass the values from dropdown box to variable in my IP application. These variables are used to restrict the char values in filters of my application. When I change the dropdown box, my variable value should automatically change. My dropdown box uses the Char/struc member (Characteristic_selection) as data binding because I am doing the cascading dropdown boxes for my selection. I can not use variable as data binding for my dropdown box and I know this will work if I use the variable selection as data binding for drop down box.
    Now, the dropdown value is never stored in the variable, I don't know what I'm doing wrong.
    So, I need to know:
    - Variable settings
    - Dropdown settings
    - Dataprovider sttings
    I am using WAD 7.0
    Thanks!

    Hi Sebastian,
    Ok if I understand right, you have 2 DropDown webitems - on selection of one you would want the 2nd to filter which is cascaded action on DropDowns; and on selection of each DropDown you would want to pass the selections to the main query variables. Check if the below settings work;
    DropDown 1 -> DP1 (perhaps on a master IO), Characteristic -> say C1, Affected Data Providers -> DP2 (DP of DropDown 2), Action -> Command via Command Wizard -> Execution Point of Time -> After Default Action, Command -> SET_SELECTION_STATE_BY_BINDING (under Data Provider Commands -> Commands for Filter Values), Data Provider Affected -> main query DP assigned to the Analysis webitem, Selection Binding -> Characteristic -> C1, Binding Type -> Variable, choose corr. query Variable
    DropDown 2 -> DP2 (perhaps on a master IO), Characteristic -> say C2, Affected Data Providers -> None, Action -> Command via Command Wizard -> Execution Point of Time -> After Default Action, Command -> SET_SELECTION_STATE_BY_BINDING (under Data Provider Commands -> Commands for Filter Values), Data Provider Affected -> main query DP assigned to the Analysis webitem, Selection Binding -> Characteristic -> C2, Binding Type -> Variable, choose corr. query Variable
    --Priya

  • How to put variables in WAD

    Gurus,
    I'm new to WAD. Please could you guide me how to have variables in WAD (for planning). Right now When I launch the WAD it pops up for all the variables. But what I want is that it should not ask for any variable while launching the WAD and later the variables should be filled up by drop downs inside the WAD. Is that possible?
    BR,
    SSC

    Hi,
    Is there a way to avoid pop up while launching the web application
    --> You can set in general tab of web template properties the variable screen to false (unmark it) "Display Variable Screen". Check:
    Web Template Parameters
    http://help.sap.com/saphelp_nw04s/helpdata/en/14/31fa826d0bd540899b02888bf55df4/frameset.htm
    In this case when I have created a drop down box for company code and then linked it to the variable in planning function
    --> You can use CHARACTERISTIC_SELECTION for your variable. Then read it from drop down box.
    Check:
    Data Binding Type CHARACTERISTIC_SELECTION
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/e7460656b60a29e10000000a11466f/frameset.htm
    and
    Dropdown Box
    http://help.sap.com/saphelp_nw04s/helpdata/en/c0/de413a51ce2e3ae10000000a11402f/frameset.htm
    Is this correct that I will have to choose variable value twice. While launching the web application (as a pop up) and then in the drop down once the web application is launched.
    --> If you use a variable for restriction of a query I think this is not correct. Query is restricted by the variable value you can not choose it again from drop down. But you can overwrite this value with dropdown value...
    Check this link how to create planning applications with the WAD...
    Creating Planning Applications in the BEx Web Application Designer 
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/c8240e47460aa5e10000000a1553f6/frameset.htm
    and
    Execute a Planning Function (Simple)
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/f0f8dc73b56bede10000000a11466f/frameset.htm
    Regards
    Andreas

  • Use variables in ParallePeriod function in MDX

    Hello, I am using PARALLELPERIOD () function in MDX. the syntax is
    PARALLELPERIOD([Date].[Calendar Hierarchy].[Year],1,[Date].[Calendar Hierarchy].[Date].&[20131201]). My question is can i use two variables in this? like PARALLELPERIOD( @Level,1,@Member). I know we can do PARALLELPERIOD([Date].[Calendar Hierarchy].[Year],1,@Member).
    With this two variables, i can use same query for calendar hierarchy and week hierarchy etc. Please let me know your thoughts. A work around solution is also fine.
    or can I derive @level from @member on the fly? something like PARALLELPERIOD( @Member.level,1,@Member)
    thanks in advance.
    prajwal kumar potula

    You can use variables like that client side.  That may be a .NET function that generates MDX, or SSRS does the same thing.
    Regarding whether you can derive @Level from @Member, yes you can.  Once you have substituted @Member in the query, you can use the .Level function, so it would look like this - after substitution:
    PARALLELPERIOD( [Date].[Calendar Hierarchy].[Date].&[20131201].Level,
    1,
    [Date].[Calendar Hierarchy].[Date].&[20131201]
    Christian Wade
    http://christianwade.wordpress.com/
    Please mark correct responses as answers!

  • Show date variable in WAD Template.

    HI,
    I want to be able to show the date variable in WAD template. To do this I used the info field web item. This web item  has the option to show variables which is great, but unfortunatly for me it also shows all the other variables I am using. I can not see anywhere where I can restrict it to only show the date variable.
    Does anyone know how I can do this or is it something I would have to do query side.
    Regards
    Forhad

    Hi Forhad,
    Yes you can show the date var alone, for this you would have to choose the specific date var under Data Binding -> List of Text Elements to display -> Text Element Type =  Variable Value, Variable = (select the date var from the available list).
    You may also turn off the Static Variables & Dynamic Variables if required.
    --Priya

  • How to... get local fox variable into WAD

    Hi guys,
    we have a (technical) weird requirement to fullfill. There is a parameter (a string) we need to update several times when running our web templates. We have this parameter in our fox coding and it needs to be updated i.e. when loading the templates the first time, when buttons are triggered etc (if we use a customer exit we can not update the parameter when i.e. a button is triggered).
    What do we need this parameter for? We have to display it in a text field in our templates (it must not be a text field but it has to be present all the time in these about 70 templates). However if we use a text field the best would be to link the parameter using a variable. Anyway I do not know how to set a global variable within fox coding...
    What do you suggest? How can a global variable be set using fox the easiest way? Or is there any other way to display a local fox variable in WAD (using javascript or something else)?
    Any helpful ideas or answers will be <removed by moderator>.
    Thks & Brgds,
    Marcel
    Edited by: Siegfried Szameitat on Dec 3, 2008 3:04 PM

    Your requirement didn't get very clear to me but maybe you can explore whether you can achieve it by calling an FM from inside the fox code.

  • Variable on WAD

    Hi ...can we create a variable on WAD? When we create a variable on query or function, these variable appears as pop up when we execute the WAD. On WAD we have the drop down option (which can be mapped to a characteristic). The values of the drop down is populated form the query. Can we have a variable which is similiar to a dropdown but we can play around with variable types like exits/authorizations.

    Hi Lokesch,
    for this second point, I usually create a query on the characteristic for which the variable is defined for, and include in this query the variable. Then I include this query into the web template as data provider but without any analysis item pointing to it.
    If it is a formula variable, as far as I know this is not necessary.
    For your new point - I never worked with the excel download button yet, so I don´t know what could be the problem there. In the system there is this Standars Web template that is used when you execute a query directly in the web. Maybe you can have a look at this web template and check the settings for the Excel Button there and copy it to your template.
    regards
    Cornelia

  • How can I hide figures or characts. using javascript in wad report BI NW 7

    Hi,
    How can I hide figures or characteristics using javascript or command in wad report ( BI NW 7).
    I have read the documentation for WEB API, but it doesn't provide some info on that area.
    Thank you.
    Edited by: Sergey Antonov on Jul 29, 2011 3:08 PM

    You can use REMOVE_DRILL_DOWN in WAD to remove characteristic..to remove a keyfigure with a button you could a variable with that button, which makes an invalid selection of the keyfigure though it is 2000, e.g. set CALYEAR = 1900.
    Hope it helps,
    Christian

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • Using variables to insert data in the table

    I want to insert datas in the table. I use constants,
    all the constants are stored properly in the table. But,
    when I use variables I get the error message
    "Too few parameters. expected 6".
    (I declared all the fields of the table as text only.)
    My program is "newt.jsp"
    <%@ page language="java" import="java.sql.*" %>
    <html>
    <head>
    <title>storing customer information in the database</title>
    </head>
    <body>
    <%
    String cno1 = request.getParameter("cno");
    String n1 = request.getParameter("n");
    String add11 = request.getParameter("add1");
    String add21 = request.getParameter("add2");
    String phone1 = request.getParameter("phone");
    String email1 = request.getParameter("email");
    Connection con = null;
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:customer"," "," ");
    Statement statement1 = con.createStatement();
    Statement statement2 = con.createStatement();
    statement2.executeUpdate("create table cust1 (cno varchar(20),n varchar(20),add1 varchar(20),add2 varchar(20),phone varchar(20),email varchar(20))");
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values(cno1,n1,add11,add21,phone1,email1)");
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    catch(ClassNotFoundException cnfe) {
    System.err.println(cnfe.getMessage());
    catch(Exception e) {
    System.err.println(e.getMessage());
    finally {
         try {
         if(con!=null) {
              con.close();
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    %>
    <br><br>
    Mr./Ms. <%=n1 %> <br>
    Your datas have been stored.<br>
    </body>
    </html>
    Those who know answer please reply.
    My thanks in advance.

    I would expect your insert statement to be this:
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values('"+cno1+"','"+n1+"','"+add11+"','"+add21+"','"+phone1+"','"+email1+"')");
    If you just create a string, it's not going to fill in variables into the string by magic.

  • Using variable with the same name as field name?

    I have a complex proc where I have variables with the same name as field name used on a query. something like this:
    SELECT a.id_table WHERE a.id_table = id_table
    where the last id_table is a parameter sent to the proc:
    declare procedure myproc(id_table int)
    Is there any way or notation to declare the variable inside the query as a variable or I have to use a different name?

    Well, variables are not the only thing you have to change if you want to switch to Oracle.
    Although I don't think it is good practice (to use variable name same as column name), here is one example how you can achieve it using EXECUTE IMMEDIATE and bind variable
    SQL> select deptno, count(1)
      2  from scott.emp
      3  group by deptno;
        DEPTNO   COUNT(1)
            30          6
            20          5
    10 3
    SQL> set serveroutput on
    SQL> declare
      2  deptno varchar2(10);
      3  i number;
      4  begin
      5  deptno:=10;
      6  execute immediate
      7  'select count(1) from scott.emp where deptno=:deptno' into i using deptno;
      8  dbms_output.put_line('OUT ---> '||i);
      9  end;
    10  /
    OUT ---> 3
    PL/SQL procedure successfully completed.
    SQL> Message was edited by:
    tekicora
    Message was edited by:
    tekicora

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    Hi,
    REPORT ZPRUEBA782 .
    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    start-of-selection.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    enddo.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    enddo.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    end-of-selection.
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    endloop.
    endform.
    You can try it if you don't find a better solution.
    Cheers,
    Chaitanya.

Maybe you are looking for