Automated start of Excel BEx Analyzer via Web VBScript

Hi all,
at first... all the versions:
SAPGUI 6.40 Patch Level 19, BW 3.5 Addon Patch 9, BI 7.0 with NetWeaver 2004s, Excel 2002 SP3.
I got the following working code to start Excel out of our Intranet, start the BEx Analyzer and connect to our BW:
<html>
<head>
<title>Excel Script</title>
<SCRIPT LANGUAGE="VBScript">
sub bwreport()
Dim app
Dim myConnection ' As Object
Dim logonToBW2 ' As Boolean
' Launch Excel
set app = createobject("Excel.Application")
' Make it visible
app.Visible = true
' Open xla file
app.Workbooks.Open("C:ProgrammeSAPFrontEndBWsapbex.xla")
app.Run("SAPBEX.XLA!sapBEXinit")
' Logon to BW
logonToBW2 = False
Set myConnection = app.Run("SAPBEX.XLA!SAPBEXgetConnection")
With myConnection
.client = "001"
.User = "myuser"
.Password = "mypw"
.Language = "de"
.systemnumber = "00"
.ApplicationServer = "xxx.xxx.xxx.xxx"
.UseSAPLogonIni = false
.Logon 0, True
If .IsConnected = 0 Then
MsgBox "Verbunden"
.Logon 0, False
If .IsConnected <> 1 Then
MsgBox "Fehler beim Verbinden"
End If
End If
End With
app.Run("SAPBEX.XLA!SAPBEXinitConnection")
logonToBW2 = True
' Give the user control of Excel
app.UserControl = true
end sub
</SCRIPT>
<P> </P>
</head>
<body>
<button onclick= "bwreport()">Alternative Excel</button>
</body>
</html>
I'm still working on two issues here and hope you can help me:
1.
app.Workbooks.Open("C:\Programme\SAP\FrontEnd\BW\sapbex.xla")
The Webscript will be used by many BW-Users so the full installation path is not the same for all users. Is there a way to start the Analyzer without the full path ?
When I start Excel with "Excel.Application" via OLE out of my Script, then BEx is not automatically loaded, that's why I need the above line.
But when I start Excel manually, it's loaded automatically. So there has to be some way Excel "knows" the location of an installed BEx Add-In. Maybe there is some addition to say Excel to start all it's usual Add-Ins, or to start in standard behaviour ?
2.
app.Run("SAPBEX.XLA!sapBEXinit")
Before I added this line, I always got the BEx Analyzer title "xxxsapbexxxx" and was unable to use any macros or functionality of the BEx Analyzer.
I found hints and code examples to use "RunAutoMacros" so sapbex.xla is fully initialized but wasn't able to make it work in my code.
So I checked the macros of sapbex.xla and "sapBEXinit" seems to do the job although I'm not sure if this is a complete/clean initialization of the sapbex.
Thx,
  Thomas
Message was edited by: Thomas Kassumeh
Message was edited by: Thomas Kassumeh

Welcome to SDN.
First of all thanks for sharing the script, good work.
coming to your first question.
you can get the path by reading the system registry
its under <b>"SAP.BusinessExplorer.Analyzer\path"</b>
if you analyze the FM "RSAH_LAUNCH_EXCEL" in BW system, you can get the logic for your script.
Regards
Raja

Similar Messages

  • Cannot open query in Excel (BEX analyzer)

    Hello Experts,
    Issue: Cannot open the BEX report in Excel but can open the same report on IE.
    1) I am trying to open a BEX report "ReportA" in Excel (BeX Analyzer).
    2) As soon as the report opens it shows me a message "Do you want to open the 3.X workbook for upgrade"
    3) I click on "OK"
    4) then i get a message window listing a lot of warnings liike " Access to project denied"  "creation of items failed"
    5) i click on "OK"
    6) Now, variable entry screen appears
    7) i enter values and click on "OK" the report does not show any data.
    Now, the same report "reportA" when i open it in Internet Explorer, it displays data. What can be reason for this problem in BEX analyzer ?
    Please comment.
    Regards,
    Suraj S Nair
    Edited by: Suraj S Nairon Dec 28, 2009 10:50 AM

    Hi Suraj,
    If you want to execue your query, you can use the bex analyzer.
    If you are opening the query from query designer 3.x query in 7.0 fronend, it will get upgraded and then cannot be reveted.
    In your case this automatic migration might be havng some issues, owing to complexities.
    Please recheck.
    -Vikram

  • Using Bex Analyzer via internet

    Hello experts,
    I have BW 3.5 and do not have portal. I want users travelling in various locations to access / run queries via internet. Some queries are static (updated once a day) and some are dynamic (structure updated every 15 min). What all steps do I take to acheive this?
    Any help would be rewarded with points.
    Thanks
    UV

    Hi UV,
    Ok..Here are the steps to create a simple web report:
    1. Create a quesry on your cube. Goto bex analyzer and just drag and drop a few chars in the rows and columns sections and save.
    2. Now goto start -> programs -> business explorer -> web application designer.
    3. In the WAD drag and drop table web item (you would find lots of them like table, chart, etc..) to the rightr hand side.
    4. Now below the web items you would find the properties tab. Now in the properties for the table select the query that you created. Save.
    5. There is a button in WAD to execute the report in browser. Execute and check.
    Bye
    Dinesh

  • Launch of BEx Analyzer via RRMX, other transaction?

    Transaction RRMX has been a common means for us to launch the BEx Analyzer in our BW 3.x system.  After upgrading to NW04s, transaction RRMX continues to call the 3.x BEx Analyzer.  Is there a way to have this call the new NW04s (7.0) BEx Analyzer or perhaps to call it from a different backend transaction?
    Regards,
    Rod

    Hi Bala
    We have upgraded our development box to 2004S including front end ( SP9 and FEP 903). As we are not able to perform old 3.5 functionalities in 2004S with FEP 903 we have decided to go back to 3.x Bex Analyzer.
    As you explained below, can you please shred some light how to configure to launch only 3.x BEx anayzer from START->PROGRAM->BUISNESS EXPLORER. We dont want to see the 2004S BEx analyzer if we navigate from START menu.
    I am able to bring 3.X analyzer through RRMX after making changes in the GLOBAL SETTINGS as you said.
    I am not able to locate Analyzer under BEx in my PC as you mentioned below.
    HKEY_CURRENT_USER\Software\SAP\BEx\Analyzer]
    "LAUNCH_VERSION"="LEGACY
    Can you provide me more details for the sentence "For non NW04s BW system to launch only 3.x BEX, there is a fix that need to be applied to the backend system" as you mentioned previously.
    I appreciate your help.
    Thanks
    Prasad Talluru

  • Please Help -- Launch of BEx Analyzer via RRMX?

    We have users who access SAP BW reports and are having problem accessing the reports.The cause for this is the latest version of Business Explorer Release 2004's 7004.4.0.5. According to corporate standards, users need to have Business Explorer 3.5 version only and this will be supported correctly.
    How do we configure to launch only 3.x BEx anayzer from RRMX?
    We don’t want to see the 2004S BEx analyzer.
    I am able to bring 3.X analyzer through RRMX after making changes in the GLOBAL SETTINGS for individual user.
    How can we do this setting on every PC in the company without going to each PC and fixing it? We have around 800 users.

    Hi
    I am trying to find out what version we are in SAP BW. I tried to go to tcode - SAINT or SPAM or RSA1-->system status to find the version (SP>=10) as per Chetan.
    It was bit confusing for me to see which the right SP was. I have asked the basis to give me update on this.
    If we are in SP>=10, who would do the changes? Can you please let me know?
    I would like to thank every body who are helping me. I would give more points once I am able to solve this.
    Thanks again.
    Kiran

  • Can we run a query with variable screen at start up in Bex Analyzer

    Hello all,
    I have a query which asks for fiscal year and posting period at the start of query run. But when I run the query in analyzer, it gives me this error all the time.
    "Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    System error in Program CL_RSR_REQUEST and form TEXT_ELEMENTS_GET: VARIABLE"
    Can someone help,
    Thanks in advance.

    Hello,
    Please check if OSS note 858458 is applicable in your case.
    Regards,
    Praveen

  • Error when launching BEx analyzer from Portals

    BI Gurus...
    We are working on an initiative to migrate our user interface from SAP GUI to Enterprise Portal.
    Bex Analyzer is primary mode of reporting at this time.
    After importing the Roles into EP, I am able to execute the web queries successfully, in the BEx Wen analyzer. But, I get an error when I click on any of the excel workbooks. Our expectation was that once we click on the excel workbook name, the BEx analyzer will launch from EP. But it seems like the issue is with launching BEx Analyzer from BI Portal.
    Has anyone faced this issue before?
    Is it possible to launch BEx Analyzer from EP?
    Are their some key portal settings we have missed out on to enable launching BEx analyzer from EP?
    Please provide your thoughts/experience.
    Thanks,
    Ajay.

    Hi WernerS,
    Thanks for your response.
    The RRMXP Transaction works and it launching the BEx Analyzer as expected.
    Now, as per our research, I think there are 2 ways of launching BEx analyzer from BI Portals.
    1) Call via a URL
    You can call BEx Analyzer via the following URL: http(s)://<server:port>/sap/bc/bsp/sap/rsr_bex_launch/bexanalyzerportalwrapper.htm
    You can modify the URL to open BEx Analyzer with either a workbook, a query or a query view. You can use the following parameters to do this:
    ●      Parameter to open the workbook: ?WBID=<wb_id>
    I have tried calling via URL iView, but instead of launching the BEx Analyzer, it just throws a dialog box to "save" or "open" a file, RRMX.bex. When I try to open this file, it says "Invalid File Format".
    I tried opening the file in notepad and I see the following parameters passed.
               test
               Data=BX2,CONAJP,EN,mikoyan,17,,,250,
               9
    Any clue about what I am doing wrong?
    2) Calling via a Transaction
    You can generate BEx Analyzer in Portal Content Studio as an SAP Transaction iView.
    The iViews are of type SAP Transaction iView and have the code link com.sap.portal.app integrator.sap.Transaction.
    The most important properties are System, Transaction Code (TCODE) and ApplicationParameter.
    ●      The Transaction Code for all workbooks is RRMXP.
    ●      The ApplicationParameter property contains the value WBID=<WORKBOOK_ID>.
    I have tried this approach as well. When I open this iView, I see the RRMXP transaction in the Internet explorer, but the workbooks still does not open in the BEx Analyzer (Excel)
    Any thoughts on where am I going wrong ?
    Thanks,
    Ajay.

  • BW on HANA Trial - Using BEx Analyzer

    Hello,
    is my assumption correct that it is not possible to use BEx Analyzer with the BW on HANA Trial?
    When I try to start BEx Analyzer via remote desktop of my instance nothing happened. Also I found a comment that there is a license problem with micrsoft und that´s the reason why it doesn´t work.
    Do you know any workarround to use BEx Analyzer or Analysis for Office with BW on HANA Trial?
    Thanks for your help!
    Christine

    Hello Christina,
    the private network option will be offered when you setup your AWS account with the VPC settings.
    More details can be found in the FAQ section.
    http://scn.sap.com/docs/DOC-33673
    if you want to use your local GUI you will have to open the corresponding ports in the Virtual Machine settings.
    I would also like to highlight the fact, that this is a Trial and that - based on the Terms and Conditions - you can not upload your own data and you can not connect it to your own ERP systems.
    see the restrictions here:
    http://scn.sap.com/docs/DOC-58120
    A trial is there for you to experience the software based on the predefined scenarios.
    regards
    Ingo Hilgefort

  • CKF not showing correct results in BEx Analyzer

    Dear Friends,
    I am getting different results when viewed from BEx Analyzer and Web Analyzer for the same query. BEx Analyzer shows incorrect results. The column that is showing different is a local formula (say Formula3) that is a result of dividing Formula1 by Formula2.
    BEx Web calculates Formula3 correctly while BEx analyzer does not.
    I am in BI 7.0 SP 10.
    Any Clues?
    Thanks
    Viren

    For this calculated column set aggregation level as sum.

  • How to make BEX analyzer work in ALV?

    Hai,
    As we have an export button on alv, it has 2 options  : EXCEL & Bex Analyzer.
    Export to excel is working fine, but Bex is showing a dump as follows:
    The following error text was processed in the system ECD : You can only work in client 000
    The error occurred on the application server haasdevecc_ECD_01 and in the work process 0 .
    The termination type was: ABORT_MESSAGE_STATE
    The ABAP call stack was:
    Function: RS_MANDT_CHECK of program SAPLRSMANDT
    Form: CLIENT_CHECK of program SAPLRSDG_IOBJ_DB_READ
    Function: RSD_IOBJ_INCL_ATR_NAV_GET of program SAPLRSDG_IOBJ_DB_READ
    Function: RSD_COB_PRO_GET_ALWAYS of program SAPLRSDI
    Method: GET_COB_PRO of program CL_RSR========================CP
    Form: INITIALIZE of program SAPLRRSI
    Function: RRSI_VAL_SID_SINGLE_CONVERT of program SAPLRRSI
    Method: GET_CHANMID of program CL_RSR========================CP
    Method: CLASS_CONSTRUCTOR of program CL_RSR========================CP
    Method: CREATE_COBPRO_FROM_DDFIELD of program CL_RSROA_BI_QUERY=============CP.
    <b>Can anyone help to know what are the requirements to be installed inorder to make Bex analyzer work?
    or Disable only bex analyzer and allow excel option?\</b>
    Cheers,
    Madhu.

    Hai,
    As we have an export button on alv, it has 2 options  : EXCEL & Bex Analyzer.
    Export to excel is working fine, but Bex is showing a dump as follows:
    The following error text was processed in the system ECD : You can only work in client 000
    The error occurred on the application server haasdevecc_ECD_01 and in the work process 0 .
    The termination type was: ABORT_MESSAGE_STATE
    The ABAP call stack was:
    Function: RS_MANDT_CHECK of program SAPLRSMANDT
    Form: CLIENT_CHECK of program SAPLRSDG_IOBJ_DB_READ
    Function: RSD_IOBJ_INCL_ATR_NAV_GET of program SAPLRSDG_IOBJ_DB_READ
    Function: RSD_COB_PRO_GET_ALWAYS of program SAPLRSDI
    Method: GET_COB_PRO of program CL_RSR========================CP
    Form: INITIALIZE of program SAPLRRSI
    Function: RRSI_VAL_SID_SINGLE_CONVERT of program SAPLRRSI
    Method: GET_CHANMID of program CL_RSR========================CP
    Method: CLASS_CONSTRUCTOR of program CL_RSR========================CP
    Method: CREATE_COBPRO_FROM_DDFIELD of program CL_RSROA_BI_QUERY=============CP.
    <b>Can anyone help to know what are the requirements to be installed inorder to make Bex analyzer work?
    or Disable only bex analyzer and allow excel option?\</b>
    Cheers,
    Madhu.

  • Bex broadcaster in bex analyzer

    Dear all,
    I have created a report in bex analyzer. I want to add this report to portal, therefore  i need to select bex broadcasting from excel bex analyzer menu.
    My questions are as follows:
    1) As i read in document, i can put analyzer reports in portal. Is it correct?
    2) In excel bex analyzer menu, my bex broadcaster menu item is in display mode. Why can it be like this?
    Thanks

    You can directly add the BEx query to the portal. While creating iview there is an option for BEx query also. Just select your query there and you can access this query through portal. For that Broadcaster option present in BEx analyzer I m still searching how to use it.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bd/3d1640d4642402e10000000a1550b0/frameset.htm
    Also check this for more details.....
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a3/7b583c2439e66fe10000000a114084/frameset.htm
    Hope it helps
    Regards
    Lalit k Tyagi

  • NW2004s Sneak Preview - Unable to logon using BEx Analyzer or WAD

    We have installed SAPNW2004s Sneak Preview Full ABAP Edition (with Web Dynpro for ABAP!) with the GUI recommneded on SDN download page.
    SAP Frontend Package 6.40 Final Compilation 3
    =============================================
    SAP Frontend Package 6.40 Final Compilation 3 for Win32
    Product  Version   Release State    Patchlevel
    GUI      6.40      Final           8
    SCM      4.0        Final           1
    BW       3.5       Final           3
    KW       7.0       Final              0
    I can log on to Client 001 and access BI, but on trying to access using the BEx Analyzer and Web Application Designer, I get a error message saying the "User or password is not correct (Repeat Logon).
    I have already provided all relevant authorization to the user I am using to logon to BEx. My Opersting system is Windows XP Professional SP1
    However, if I use the RRMX transaction (using the old GUI)
    SAP Frontend Package 6.20 Final Compilation 4
    =============================================
    SAP Frontend Package 6.20 Final Compilation 4 for Win32
    Product  Version   Release State    Patchlevel
    GUI      6.20      Final          32               
    APO      3.0A      Final          19
    BW       3.0B      Final           7
    KW       5.2       Final              4
    SEM      3.5       Final              0
    I can log onto BEx anlyzer. Your help in resolving the problem would be highly appreciated.

    Roger,
    When installating the Comp 4 GUI make sure you have selected the BI 7.00 Add-on. There you will also find BW 3.5. For the time being just select BI 7.00 Add-on. The Patch will only update the files if they are already exisiting (installed).
    Only ensure that the user has following roles assigned:
    SAP_BW_ALL
    SAP_BW_ANZEIGER
    SAP_BW_AWTEST
    SAP_BW_DEVELOPER
    SAP_BW_SEM_BPS_APPLICATIONS
    SAP_BW_SEM_LP
    and Profiles:
    SAP_ALL
    SAP_NEW
    S_A.SYSTEM
    S_RS_ALL
    RS_RS_EXPL_A
    Plus a Z_BI_ROLE (having ALL authroization for below objects)
    Z_BI_ALL                            All BI Authorizations                                                                               
    5       Manually   Cross-application Authorization Objects                      AAAB              
            4          Manually   Authorization Check for RFC Access                           S_RFC      
                                                                  5       Manually   Basis - Development Environment                              BC_C                                                                               
    4          Manually   ABAP Workbench                                               S_DEVELOP  
                                                                  5       Manually   Business Information Warehouse                               RS                
            4          Manually   Infrastructure of the Analysis Authorizations                S_RSEC     
            4          Manually   Data Warehousing Workbench - Objects                         S_RS_ADMWB 
            4          Manually   BI Analysis Authorizations in Role                           S_RS_AUTH  
            4          Manually   Business Explorer - BEx Web Templates (NW 7.0+)              S_RS_BTMP  
            4          Manually   Data Warehousing Workbench - InfoSource (Flexible Update)    S_RS_ISOUR 
            4          Manually   Data Warehousing Workbench - Open Hub Destination            S_RS_OHDST 
            4          Manually   Data Warehousing Workbench - Process Chains                  S_RS_PC    
            4          Manually   Business Explorer - Individual Tools                         S_RS_TOOLS

  • BEx Analyzer - Start BEx when Excel starts

    Hi,
    Our company uses MS 2010.  We recently installed BEx Analyzer to several employee's PCs.  On ONE out of 5 PCs, the user must re-check the box under Global Settings for "Start BEx Analyzer when Excel starts" every time she starts her PC each day.  It stays checked until she shuts down the PC.  What could be wrong?  What should I look at?
    Thanks,
    Debbie

    so at the end of day  when she shuts off and log in again analyzer doesnt open in excel again.?
    there is way to do that in excel to open a program .. may be they can help.
    only thing i can think of that she deletes her cookies when she logs off so excel cant save it properly.
    http://office.microsoft.com/en-us/excel-help/customize-how-excel-starts-HP005199391.aspx

  • Start Excel 2007 without BEx Analyzer 7.0

    Hi there,
    I use Excel 2007 and if I start "Excel 2007" the Analyzer 7.0 starts automatically. Does anyone know how I can start Excel without the Analyzer? It seems that it's no AddIn (*.xla like Analyzer 3.5) but an *.exe.
    Thanks for any help,
    NIcole

    Hi,
    Go to BEx analyzer -> Global settings and there untick 'Start BEx Analyzer When MS Excel Starts'. That should stop it.
    Regards,
    Michael
    Edited by: Michael Devine on Jul 21, 2011 2:22 PM

  • Wrong Currency shown in Bex Analyzer / SFr. Symbole in Excel

    Hi Experts,
    Hi have a question regarding the display of currency in Bex Analyzer.
    I have a report showing Euro in the most of columns and one column should shown usd. The conversion is done in the backend.
    By running the report the column which should show USD show SFr. (Not a currency).
    In Excel i checked in format cell--currency. There SFr. is define as Symbole. It is a general problem. How to solve it?
    Thanks
    Gilo

    Hi Andrey,
    thank you for replying.
    Have you added IO currency to rows ?
    --  Other Columns with Euro are showing the correct currency.
    Does your conversion work correct ?
    -- Yes
    If you execute the report in bex query designer (via web) do you get correct results ? i can not execute via web.
    I execute in rsrt and the column is showing the result with $. I expected to see USD.
    1. why is bex showing the wrong currency?
    2. why is the result under rsrt with $ instead of USD?
    Thanks
    gilo

Maybe you are looking for

  • Problems with uploading master data in BI 2004S

    Hi all, I wanna upload master data in FI from R/3 System to BI System. I created its <b>transformation</b>. Then, I <b>migrated</b> it WITH EXPORT option. After that, I created <b>Data Transfer Process</b> (DTP), I didn't change any thing, just "Save

  • Post Query Trigger with cursor

    Good afternoon to all of you! I need your help. I create a master detail form. I created also a post quey trigger, inside I wrote the code below. A cursor looks to another table and returns to the form some values i need! declare cursor C1 is select

  • Page to large to load in browser

    I have a curve 8520. About a week ago my phone became slow and it keeps telling me the page is to large to load in the browser. I have tried to turn off my phone taking out the battery. Can anyone help me?

  • BT Option 2 Strange Usage

    I was orignally on option 1 with BT, but after several months of going over decided to bite the bullet and upgrade to option 2. This was upgraded sometime this morning. I have a spreadsheet set up that I record all my usage up/down recorded from the

  • Apperture Localize error, Apperture Localize error

    I got a error that says Localize in Aperture when trying to buy a book anyone knows it?