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

Similar Messages

  • How to use Keyfigures in the Bex variable selection screen.

    Hi,
    I have a scenario, where the user whats to see the keyfigures like volume, amount in the variable selection screen, so that he can dynamically, set the condition according to his requirement.
    For example , he wants to see all the PO's for a particular calmonth which have volume >  1 Million or on someother day, he may input the value as volume > 2Million or Volume < 0 , so it depends. Similarly he wants to dynamically select the Amount values.
    I have tried using condition with "greater than"and value as a formula variable and it works for one condition, but if I add another condition i.e, "less than"and value as a formula variable then it conflicts and the query is throughing below error.
    "ERROR BRAIN (418): Variable ZCS_VAR_CH_KG_LT (DC015DZ850NUYVFDMPJHRGHXW) does not exist or is incorrectly used 4 Volume"."".
    Do we have a option to use customer exit in such a scenario ??, any suggestions please.

    Hi,
    Please check out the below link.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60b33a28-dca2-2d10-f3b2-d2096b460b1e&overridelayout=true
    Hope it suffice your requirement.
    Regards,
    AL

  • AnyChart: Dynamically add/remove series using javascript

    Hi all,
    The examples on the following page they dynamically show/hide series using javascript without any server side action.
    http://www.anychart.com/products/anychart/docs/users-guide/livesamples/js-series/index.html
    It seems they can do this because they add the chart to the page using javascript and so other js scripts can access a reference to the chart object. Looking at the code generated when you add a flash chart using Apex, it appears they are embedded flash. Does this stop us from using javascript to manipulate the chart object?
    Has anyone managed to do something like the example in the page above using the built-in charting of Apex?

    Between me and another poster we've sort of worked out a solution here - Re: Apex 4.0.2 Manipulate Flash Charts using Javascript?

  • How to Read Variable Values in WAD 7.0 Using JavaScript

    I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN.
    I get a Javascript error:
    bics.getElementsByTagName is not a function
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    Thats my script:
    function currency()
    var varnm = "SFS_CP_CURR"; // Name of the variable to be read
    root = document.childNodes[0]; // <HTML>
    body = root.getElementsByTagName("BODY")[0]; // <BODY>
    xml = body.getElementsByTagName("XML")[0]; // <XML>
    bics = xml.childNodes[0]; // <BICS_VIEW>
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    varl = vars.getElementsByTagName("VARIABLE"); // gives no. of variable in DP
    for ( i = 0; i <= varl.length; i++ ) // Loop one by one
    vari = vars.getElementsByTagName("VARIABLE")<i>;
    varnam = vari.attributes[0].text; // get variable name
    mem = vari.getElementsByTagName("MEMBER")[0];
    varval = mem.attributes.getNamedItem("name").value; // read variable value
    if (varnam == varnm) //check varname in loop needs to be read
    if (varval == "ZMON") // check for value1 and fire command1
    SFS_CP_M();
    if (varval == "ZKON") // check for value2 and fire command2
    SFS_CP_K();
    break;
    Where's the mistake?

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • Re: Passing Bex variable values to javascript in WAD 7.0

    Hi,
    Is there any possibility to pass a Bex variable value to the java script in WAD 7.0 so that i can create a pop up and display the value.
    I found a post explaining its possibility in WAD 3.5. but i am not able to find how it can be done in WAD 7.0
    Any inputs will help.
    Regards.
    Shafi

    Hi Shafi...
    Yes it can be done. Insert a Dataprovier Information Item and a Script Item with a code for querying the xml island that provide the infomation you need. I hope this helps. If you need help with the code let me know.
    Edited by: Alvaro Wilfrido Lozada Borrero on Dec 28, 2009 8:44 PM

  • 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

  • How can I pass variables from one project to another using Javascript?

    Hi all, I am trying to do this: let learners take one course and finish a quiz. Then based on their quiz scores, they will be sent to other differenct courses.
    However, I wish keep track on their previous quiz scores as well as many other variables.
    I found this nice widge of upload/download variables by CPguru (http://www.cpguru.com/2011/05/18/save-and-load-data-widget-for-adobe-captivate-4-and-adobe -captivate-5/). However, this widget works by storing variables from one project in local computer and then upload it to another project.
    My targeted learners may not always use the same computer though, so using this widget seems not work.
    All these courses resided in a local-made LMS which I don't have access to their code. Therefore, passing variables to PHP html files seems not work.
    Based on my limited programing knowledge, I assume that using Javascript to pass variables may be the only possible way.
    Can someone instruct me how to do this?
    Thank you very much.

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • Scroll() in Adobe Acrobat and Adobe Reader X using Javascript

    Hi there,
    Does someone know how scrolling works in Adobe Acrobat/Reader using javascript?
    The scroll() functions needs two parameters: x and y.
    How are these axises defined? Is this based per page or does the scrolling reference change every time the page changes?
    Why we need to know this? We're making and application in Flash Builder that loads a PDF. External buttons need to call an embedded javascript within the PDF that scrolls up or down.
    Anyone who can provide us with some information concerning this topic: thank you!
    Regards
    Mario

    Well,
    It's hard to formulate: basically we need to understand how the scrolling is handled in Adobe Reader.
    Like: why does the scrolling index change every time you change to a new page. It gets resetted or something.
    Anyway: you cannot create a variable "scrollVerticalIndex" and "scrollHorizontalIndex" and increment it everytime you want to go down or up/left or right and say scroll(scrollHorizontalIndex,scrollVerticalIndex). Also, if you zoom in, the dimension of your page stay the same. We cannot find a way to calculate top or bottom of a document.
    In a perfect world you could say: (height of a page) x ((number of pages)-1) = total height of the document (and thus the total amount you can scroll up/down). But that is just not the case...
    We want to get an insight how the scrolling works :-)
    Does this make sence ;-) ?

  • AS3.0 External Interface: Pass variables to flash using javascript

    Hello all,
    I am looking for a simple and straightfoward example of how I can pass the value of a variable into flash using javascript.
    Specifically, I'd like to use javascript to pass the filename of an external video file that I would like to load into my flash movie.
    I'd also like to call a function in the SWF that plays the movie once the filename as been passed to the flash movie.
    External Inferface looks like the way to go.
    I've found a few decent AS2.0 examples, but converting them to AS3.0 has proven difficult and many of the examples are much too complex for what I am trying to do.
    If you have any code samples or tutorials showing the HTML/Javascript and the associated actionscript I'd really appreciate it!
    Thanks!
    Tim

    if you create a swf (eiTest.swf) and html:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <head>
            <title>eiTest</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <script language="JavaScript">
             function thisMovie(movieName) {
             if (navigator.appName.indexOf("Microsoft") != -1) {
                 return window[movieName];
             } else {
                 return document[movieName];
         function f1(value) {
             thisMovie("eiTest").jsF(value);
    </script>
        </head>
             <body onload="f1('yourfilename.ext');">
         <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                 id="eiTest" width="550" height="400"
                 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
             <param name="movie" value="eiTest.swf" />
             <param name="quality" value="high" />
             <param name="bgcolor" value="#869ca7" />
             <param name="allowScriptAccess" value="sameDomain" />
             <embed src="eiTest.swf" quality="high" bgcolor="#869ca7"
                 width="550" height="400" name="eiTest" align="middle"
                 play="true" loop="false" quality="high" allowScriptAccess="sameDomain"
                 type="application/x-shockwave-flash"
                 pluginspage="http://www.macromedia.com/go/getflashplayer">
             </embed>
         </object>
        </body>
    </html>
    you can use:
    import flash.external.ExternalInterface;
    ExternalInterface.addCallback("jsF", asF);
    function asF(fileS:String):void{
    trace(fileS);

  • Fetch table value in BEX Web report using Javascripts, and assign condition

    Hi Gurus,
    I am currently using WAD 3.5. I need to change the web report to behave like below :-
    1. Default layout (Field A B C) with condition A & B activated.
    2. If the drilldown Field B and C is removed, leaving only field B alone in the report drilldown, deactivate condition A & B, Activate condition C & D.
    3. the above can be reversed where user drilldown field B & C into the layout, the condition A & B need to then be activated back.
    So I believe this can be done using Javascript. So my questions are below
    1.) How do i fetch table value for the navigationblock ? with navigationblock i am able to know what are the columns are in the drilldown (i will not display free characteristics, so ignore this part). how do i read the content of NAVIGATIONBLOCK_1 as shown in following code? using javascript.
    <P><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="NAVIGATIONBLOCK_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_NAV_BLOCK"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="SHOW_FREE_CHARACTERISTICS" value=""/>
             <param name="SHOW_NAVIGATION_ICONS" value=""/>
             <param name="SHOW_FILTER_ICONS" value=""/>
             ITEM:            NAVIGATIONBLOCK_1
    </object></P>
    2.) After question 1.) is done, please advice how do i activate/deactivate the conditions? based on the fields found in above. Maybe I can use IF navigationblock_1 contain field A only, then set condition A & B , etc.
    <p><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="CONDITIONLIST_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_CONDITION"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             ITEM:            CONDITIONLIST_1
    </object>
    I would appreciate if we can solve Question 1 first before proceed to 2.)
    Please advise. Thanks

    Hi JTi,
    what i have understood from your requirement is that you want to access the web item table_1 in javascript, you can get that as below:
    Add
    <span> 
    tag before your web item and set its id to table.
    <span id = "table">
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="GET_ITEM"/>
    <param name="NAME" value="TABLE_1"/>
    <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
    <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
    <param name="GENERATE_CAPTION" value=""/>
    <param name="CAPTION" value="jezel"/>
    <param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
    <param name="BLOCK_SIZE" value="0"/>
    <param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
    ITEM: TABLE_1
    </span>
    In javascript access it as :
    var mytable = document.getElementsById("table");
    Hope this helps
    Thanks
    Dipika

  • Change Data Entry Template variable values using javascript

    Content ServerIs there a way to change the Data Entry Template's text/Integer variable values using javascript?

    I believe you're asking if you can change the value of a content item's property using Javascript (a content item is created from a data entry template, which defines the set of properties).
    Unfortunately there is not a way to permanently change it in the content item, since Javascript is executed client-side rather than on the server. However, if you're just interested in how the value is displayed in the published HTML, you could modify the presentation template to store the property value into a Javascript variable and then manipulate it to be displayed in whatever manner you wish.

  • How jsp to use javascript's variable??

    Hi, how jsp to use javascript's variable or a jsp's variable can be assigned a value in the javascript??
    thx

    well i havent accessed the value of javascript variable in jsp
    yet but i have accessed the value of a java variable in java script
    try it
    <script ...>
    function jspToJavaScript(a){
    alert(a);
    </script>
    <%
    int a=10;
    %>
    <img src="..." onClick="jspToJavaScript(<%=a%>)">

  • Is it possible to pass the score of the memory game as a variable using javascript?

    Hi,
    I would like to create a score table for the memory game. For that I need captivate to pass the last sore to a form/page. In the memory game widget there is a variable displayed: memGame_var. Is this really the memory game score, and do you think that I can achieve my goal using javascript?
    thank you!
    Heloisa

    Beware: you have to create a variable, it is not automatically created. And you don't have to use the same name, but in this case for some reason it is not possible to use capitals in the variable name.
    Contrary to some other games, this variable will retain the score indeed.
    Lilybiri

  • How to use javascript variable in BSP/ABAP and vice versa

    Hello Experts,
    In IC WEBCLIENT, there is a view.In the view.htm i want to fetch  the screen resolution and as per the resolution i want set the width of that view.
    1, I wrote the below  javascript to fetch the screen resolution.
       Can i use a notmal ABAP variable inside the javascript? and   If i use can i access that variable after the javascript.?
       Can i assign a javascript variable to a nrmal abap variable??
       The code sample  is like :
    Start of javascript
       if (screen,width == 1024 )
         lv_width = 500  "lv_width is an ABAP variable.
      else
        lv_width = 700
    **END OF JAVASCRIPT
       **Now i want to use lv_width  to assign to a table view attribute(Width)
    <crmc: tableview..
                    width = <%= lv_width >
    the code is not giving any error. But the problem is that lv_width is not giving the correct value, its getting initialized to initial value...
    Requesting the experts to please provide some suggestions/solution for the above issue.
    Thanks and Regards
    Sudhansu

    Hello Sudhansu,
    First of all there was a little mistake at my previous answer:
    you got lw_width = 700
    because at Server Side you have following code:
    lw_width = 500.
    lw_width = 700.
    but if you were writing your code like this:
    <%=lw_width %> = 700.
    then you will get the result that I was talking about : 0 = 700
    Sorry for the mistake
    Now for your question:
    if you want to get a value from the server and assign it to JScript variable you should write like this :
    var aaa;
    aaa = <%=lw_width %>;
    this code assign the server variable lw_width value into aaa  JScript varible.
    I'm not sure what exactly you want to do but look at this link:
    http://www.pageresource.com/jscript/jscreen.htm
    to get the idea how to get and use Screen Resolution variables at your JScript code.
    Good luck
    Eli Steklov
    Please Reward Points if it Helped

Maybe you are looking for

  • Budget report in sap CO

    Dear Expert, I need report that can show this information : cost element, cost center, description, proposed budget in year xxxx, approved budget in year xxxx. Is there any SAP standard report which suitable with this requirement? Thank you.

  • Why should still we use String though we have StringBuffer?

    I hope StringBuffer is best instead of String. Since StringBuffer grows itselfs when the content increases with out creating new object . So now I have a question, Why should still we use String though we have StringBuffer? whether do you any proper

  • High CPU utilization on MacBook Pro Retina (Late 2013)

    Changed from an iMac (high end - mid 2011) to a MacBook Pro retina (late 2013). 2,3ghz, 16GB Ram, 500gb ssd using LR 5.5 CC with 55.000 pictures. Now when using LR, CPU runs with 200-280% and the fans are very noisy (activity app - LR uses 200-280%)

  • My photostream do not work on windows 8 pc

    After having changed country for itunes store etc. My photostream do not connect from my PC - still works between the two iOS devices (iPhone & iPad) I have. I have tried reinstalling on the WIndows 8.1 PC, but nothing helps.

  • Nikon D810 NEF's Open in ACR But Not PS CS6

    I just installed ACR 8.7.1 and can view and adjust Nikon D810 NEF files but when I press "OPEN" (from ACR) to begin work in PS CS6 they will not open. CS6 does launch but I dont see the NEF file. My Canon CR2 and Fuji RAF files open fine in in CS6. A