Scripts in WAD

hi techies,
        i have a requirement like this
I have to use a Radio button in which there should be options like
report 1, report 2 ,report 3 so for this i have written Java scripts but now i dont how to assign data provider for this.....
each of the report should have a different data provider..... can any one send me the script if possible..........
I want to know the method which i have done is correct and help me to proceed me further.........
pls its urgent
regards
sri

Hi Ram,
I am not sure of assigning a data provider but what can be done is u can fire a URL that contains a the name of data provider with the variables(if any). So if the use has selected reprot one the URL can be
<form action="<SAP_BW_URL DATA_PROVIDER='View 1'
FILTER_IOBJNM='0CALYEAR'>" method="post">.
The SAP_BW_URL  gets the URL for your report you are presently viewing and can append these commands so that the new report can be opened. The problem that can happen here is maintaining a unique session. Since you are opening a new URL altogether one may not be able to capture the previous selction a user has made.
Arun

Similar Messages

  • Using Script in WAD

    Hi Friends,
    Can anyone help me in using the existing JAVA script in WAD.
    How to insert this Script in WAD.
    Kindlly help me in this.
    Thanks in advance,
    Regards,
    Ravish

    Hi experts,
    I am using BI 7.0 WAD only, Can just give me an simple example like where we have to write the java code and how it has to link with web item.
    Suppose for example....... When i will click the push button on the template output.......it has to give me a message saying 'HI' by opening a new window.
    ( I think here we need to write a java code to say 'HI'.......but where we have write this code...........and how to link this code to the webitems........)
    Please, can anybody help me on this, by providing the simple java code and steps to execute it.

  • Issue with Bookmark functionality (using java script) in WAD.

    Hi,
    I am working on a WAD report and instead of using the default bookmark functionality within WAD, i use a java code to get the bookmark url in a new window.
    But the problem is the java code is not working consistently at all times.
    Issue1: If i click on the bookmark button on the report for the first time, it will open up a new window with the bookmark link. But if i close that new bookmark url window and again click on the bookmark button, a new window is opened which displays the template corresponding to the bookmarkk generated earlier (the report in its executed form), instaed of the bookmark url.
    Can anyone help me to correct this issue. At any time i click the bookmark button i want to get the bookmark url opened in the new window, instead of the template.
    Issue2: The bookmark is not at all working at particular times. It will show error message at the bottom the page. What I am  thinking is, this is because of the misalignment of the java code when you sava the WAD report. The java code is so sensitive that it gets realigned each time you save the WAD report. But sometimes even without making any changes also it is not working.
    If anyone has any suggestion or inputs for solving these issues pleese help ASAP. The java code i used is given below.
    function createBookmark()
    var bwUrl="<SAP_BW_URL CMD='BOOKMARK'>";
    child1=window.open(bwUrl,'win1','width=1,height=1,alwaysLowered=0');
    window.focus();
    //Ensure that BW completed generation of the bookmark url.
    now = new Date();
    startTime = now.getTime();
    delayTime = 3000;
    //Set timeout to 3 seconds
    waitTime = startTime;
    //check if the bookmark url is ready and timeout after the specified time (delayTime).
    while (waitTime<(startTime+delayTime))
    now = new Date();
    waitTime = now.getTime();
    //BW identifies a bookmark using BOOKMARK_ID. The presence of this string
    //in the url is used to identify creation of the bookmark. If bookmark
    //is created on the server, proceed to the next step.
    if (child1.location.href.indexOf("BOOKMARK_ID") >0) 
    break;
    bookmark_url = escape(child1.location.href);
    bookmark_url = bookmark_url.replace(/%3A/g, ":");
    bookmark_url = bookmark_url.replace(/%3F/g, "?");
    bookmark_url = bookmark_url.replace(/%26/g, "&");
    bookmark_url = bookmark_url.replace(/%3D/g, "=");
    var base_url = window.location+"";
    var base_index = base_url.indexOf("?");
    base_index = base_index + 1;
    var book_link = base_url.substring(0,base_index);
    if (book_link.indexOf("sapdbi")!=-1)
    book_link = "http://dep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbia1")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbia2")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbia1")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbia2")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbi")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbi")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    var book_index = bookmark_url.indexOf("?");
    book_index =   book_index +   1; 
    var book_length = bookmark_url.length;
    var temp_link= bookmark_url.substring(book_index,book_length);
    portal_bwUrl = book_link+temp_link;
    child1.close();
    // The below two lines are not necessary, it is left for reference.
    // https://portal.xxx.com/sso/index.jsp?target=BW&SAP-               //LANGUAGE=EN&language=EN&cmd=LDOC&TEMPLATE_ID=IPUWT_FRAME
    bookmark_window=window.open("",'_blank','width=1000px,height=30px,status=0');
    bookmark_window.moveTo(50,500);
    var body_tag = '<body leftmargin=3 topmargin=3 bgcolor=#cad4e3 class=&amp;SAPBEXTbsBdyEdg&amp;>';
    var body_text ='<p><font face=Arial size=2>
    This bookmark can be copied and pasted to Internet Explorer-Favourites, mail or other documents:
    </p>';
    bookmark_window.document.write('<title name="SAP_BW_TITLE_!IID_171">Bookmark</title>',body_text, body_tag, portal_bwUrl, '</body>');
    Thanks in Advance.

    Hi Danny
    Thanks for the update
    Hi Danny
      Thanks for the update.
      I can't find any code in the attachment.Its a Web Page.
      Rightclick on webpage and View Source
      Then i can find Code.
      Still it is not working
    Issues: Which object i have to replace with the URL in the code
    Value = 'Weekly'
    or
    fun(WEEKLY REPORT)
    and
    when i paste that code in the XHTML tab of template and tried to save it,The scripted is changed
    Please update how to proceed
    Thanks

  • Java script and WAD

    Hi ,
      Can any one send me java script document or sample code for WAD . I want to custiomize the WAD using java script .
    Points will be rewarded.
    Please do not send 3.5 Web API Reference or link from SDN . That I have it already.
    Thanks,
    Aparna

    Hi Aparna,
    Here is a wonderful link which will guide you properly:
    http://www.w3schools.com/js/default.asp
    Hope it helps...
    Regards,
    Habeeb

  • Use of java script in WAD.

    Hi.
    I need to write java script for reading column heading  of a table (analysis grid in WAD) and check if heading has a particular  value suppose ‘X’ , I need to highlight that column heading with a color.Kindly provide some pointers .
    Thanks in advance,
    Neetika.

    I have somehow managed to workaround the issue.
    I use one aggregation level without Stage field to allow users to modify the data and then I use another aggregation level with Stage field to process the Stages using planning functions and filters. This works.
    I am still curious on the user exit proposed by Andrey.
    Andrey can you please provide step by step on how we achieve this?
    Thanks,
    DV

  • Convert Java Script for WAD 7 application

    Hi All,
         We are migrating our 3.x WAD applications using migration tool option available in WAD 7.0, but in case a java script is present it is giving error. What should we do for successful conversion of code as we have no expertise in JAVA.
    Regards:
    Jitendra

    Hi Ashwin,
        Actually there is code which is creating some form type object. What changes to be made in the code so the same will work in WAD 7. I am trying to send the code but its not working from here. Can u pls give ur mail id.
    Regards:
    Jitendra
    Edited by: Jitendra Gupta on May 13, 2010 5:39 PM

  • Using Java scripting in WAD

    Hi All,
    Is it possible to make changes in Java Scripts used in WAD report?
    Can anyone tell me what are the changes possible using Java scripting and from where can I get the documentation for the same?
    Thanks.

    Hi Suchitra,
    With NW2004s, most of the javascript options can be entered directly through the Script object into the Web template. The suggestion is to use the command wizard to modify/control the behaviour of the objects...
    Check this links for details regarding Javascript.
    http://www.w3schools.com/jsref/jsref_onload.asp
    Hope this helps.
    ****Assign points if helpful****
    Regards,
    Ravikanth.

  • Export Web Application [EXPORT] Command in WAD

    HI Gurus,
    Here is a strange problem. I would like a real solution because I've read just about any documentation there is out there. So, thanks for thoughtful answers in advance.
    We created a custom template ZZANALYSIS_PATTERN off of SAP delivered standard 0ANALYSIS_PATTERN. We have also created a copy of 0ANALYSIS_PATTERN_EXPORT to ZZANALYSIS_PATTERN_EXPORT template in order to modify the look and feel of how reports look once exported to MS Excel.
    Here is the problem. When specifying parameters for Export command, we put ZZANALYSIS_PATTERN_EXPORT in the Internal Display -> Web Template section which forces it to go to that new custom template once user clicks on Export to Excel button vs going through a standard 0ANALYSIS_PATTERN_EXPORT template. The problem is that once that setting is specified when we test an extra pop-up window shows up when clickin on Export to Excel button - http://server/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.web.portal.integration.launcher. That window is confusing to the users and it never closes, just blank window stays. Now, if we go back to Export command parameters in WAD and reset/leave the Default parameter setting for Internal Display section, no extra pop-up is showed and the user just gets open Excel file little window, which is what we need. So, that makes me wonder if there is some kind of backend config table where this Default setting could be changed from 0ANALYSIS_PATTERN_EXPORT to ZZANALYSIS_PATTERN_EXPORT, or maybe it is something in the BEx Web Analyzer iView in the portal.
    Thanks for your help.
    Andrei

    Hi Marcio,
    I have done this before long time ago. Yes there is no specific web item available to export as .txt ot TAB delimited file. But, it is possible from hard coding the HTML script in WAD to achieve it.

  • 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

  • Script to backup the drive maps

    Hi everyone,
    I am in the process to create a user profile backup script, that keep most of the client user profile when we have to rebuild theirs computers.
    The script is working fine, but there is only one thing that it does not do, gather the drive mappings. This is not really a big deal but it save me the time to write the mapping down before doing any work, and like we all know most of the time the user
    have no clue of what they are (or they refer to it as Z: drive) Unfortunately we do not use SCCM or GPO to push the drive maps to clients since many of them have different mapping. We use to have a VBS script written by a guy that no longer work for us, and
    it also only works on WinXP and we are using W7 Entreprise. Our current script for the backup is written in batch, and it uses Robocopy for most of the work.
    What I would like to know, is if there was a way to gather the drive letter and the network path? That way, it would be restorable by the restore script. I do not mind calling a VBS script in the backup script. 
    Ive been looking online for help but most of what I could find was backing up the entire network drive ( (Z:\)\\Server\SharedFolder ) to the computer locally, THIS IS NOT WHAT I WANT/INTEND TO DO!
    Thank you!

    Hi,
    You can get the drive letter and the network path by typing the command ”net use” at the command line Window, but if you want to to store the information to a file, I think Script Center will offer you professional answers:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    Regards
    Wade Liu
    TechNet Community Support

  • WAD Command

    Hi All,
    Is there any Command available in WAD to display confirmation dialog box  which works on the commands given by the user.
    EX : i want to execute a sequence of commands like COMM1,COMM2,COMM3.
          i want to assign all these commands to single button. but after excecuting COMM1 i want to diaply a popup msg saying ' DO U  WANT TO CONTINUE' and depends on the user input(YES/NO) COMM2 needs to execute.
    please provide some inputs for this scenario.
    Thanks in Advance,
    Reshma.

    Hi
    You can use javascript.
    Add web item "SCRIPT" to WAD and add to the script something like this:
    var ok_exit=confirm("Do you realy want to ..... bla bla ?");
    if(ok_exit) {
    Do your own logic (execute planning sequence ...)
    Regards.

  • How to read the value of Inputfield in WAD in JAVA script?

    Hi Experts,
    I have a requirement in WAD .
    I have put an Input Field (text box), a button and a script control  in the web template.
    In my script control function , I want to read the value entered in the input field using java script. How do I achieve it?
    Thanks in advance.
    Regards
    akshay

    Hi,
    To do this, first you may want to view the HTML source of the report. So, when you have the report launched with the input field, right click and select View Source. Usually it is under a <span> tag with id something like sapbi_snippet_YOURWEBITEMNAME. Most useful commands here are document.getElementById and document.getElementsByTagName.
    You can also access the input web item value using standard sap command SET_SELECTION_STATE_BY_BINDING. Take a look at the documentation on this.
    Hope the above helps.
    Regards,
    wira

  • 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

  • Formatting Bex queries output with WAD Script WebItem

    Hi All,
    We have a requirement of displaying some text for a key figure value in WAD.
    Scenario:
    We have one input enabled query lets say Q1, in that a KF1 can have either 10 or 0 value. If user input 10, then in other report lets say Q2(which is display report), status should display 'Yes' and if 0 status should display 'No'. Kindly note reports are built in WAD
    Doubts:
    1. Can we replace keyfigure value with text in WAD using Script?
    2. If Yes can you please share a sample code for the same.
    Thanks and Regards,
    Sparsh

    Hi,
    try using modification module for analysis item, try with value "string" instead of "image"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6044cb8e-972c-2e10-a38e-ae1377028e7d?QuickLink=index&overridelayout=true
    let us know if it's ok.
    hope it helps.

  • Java Script issue while migrating WAD 3.x to 7.0

    Dear Experts,
    Below is the script which I had written for a report on WAD 3.x.
    <script type="text/javascript">
    var Elements=document.getElementsByTagName('TD');
      for(var i=0;i<Elements.length;i++) {
        if(Elements[i].innerText=='-3.00') {
           Elements[i].innerText='0';
        if(Elements[i].innerText=='-1.00') {
           Elements[i].innerText='YES';
         if(Elements[i].innerText=='-2.00') {
           Elements[i].innerText='NO';
        if(Elements[i].innerText=='1.000-') {
           Elements[i].innerText='YES';
        if(Elements[i].innerText=='2.000-') {
           Elements[i].innerText='NO';
    While executing the report, it repaced the HTML values with text values.
    After migrating the report to WAD 7.0, the script stopped working. Please let me know how to achieve this in WAD 7.0.
    Thanks,
    Ravi

    You need not to call the script. Since you are using the Script web item, it gets executed automatically when you execute the web template.
    Please search this blog in SCN.
    How to read Bex variable value with JavaScript within WAD

Maybe you are looking for

  • NOMAD JUKEBOX ZEN XTRA - Reboot OS - 2 1/2 YEARS' PROBL

    I encountered a connection problem between my pc and the jukebox. They did not communicate with each other. My pc did not detect the jukebox and visa versa. I then did the following - JUKEBOX: Clean Up Reboot Reload OS (which it won t do). The messag

  • Purchase order does not update tax code in info recode ?

    Hi Expert, Please help me ........... I have 2 problems. 1. I created PO and tick Infoupdate at ME21N but tax code doesn't update to info record ? 2. How to tax code can be defaulted into PO line items by I don't want create info recode ? Thanks,

  • ITunes 10.5 won't update

    I have downloaded the new update, in order to get iOS 5 for my iPhone. However, the iTunes 10.5 goes through the install process but never completes or overwrites the iTunes I currently have loaded. Help is greatly appreciated.

  • How to enable php, mysql, and apache?

    Hi guys, I am sorry if I am not in the right forum, but I am really worried about my problem... According to this article("http://developer.apple.com/mac/articles/internet/phpeasyway.html") I already have php , apache, and SQlite installed on my mac.

  • Connect to SYSDBA from inside SQLplus? Default password?

    Ok, I could call SQLplus with the SYSDBA user as sqlplus / as sysdba but assume I am in a SQLplus session as SYSTEM user and I just want to quick switch to SYSDBA through a "conn" command and execute some instructions? How can I do this? How is the d