Add own VBA Addin (.xla) to BEx Analyzer

Hi,
I created an XLA add-in, which I activated in my Office Excel. When opening Excel my add-in works fine (I can see it in my VB-Editor below BExAnalyzer.xla and it is possiblöe to use the makros.
Unfortunately this add-in is not aktivated when opening BEx Analyzer. In this case the new add-in is not listed below the BExAnalyzer.xla, whereas it is marked to be active at the office options Special / Add-ins (extras / Add-dins in german office version).
Office 2003
BEx Front End Patch 501
Does anybody know, how to implement own xla add-ins to BEx Analyzer?
Best Regards,
Helge

I guess it's because of the way the BExAnalyzer loads Excel - it's an OLE call or something alike. In other words Analyzer loads BEx addin alone. I see two possible workarounds.
One is to find some command line parameter for BExAnalyzer.exe to make it load the addin you want. The problem is I do not know if there are any such parameters.
The other way is to load the addin after the BExAnalyzer.xla is loaded. You can easily check this way by opening your addin manually. However, doing it programmatically becomes a problem since the only piece of VBA code loaded is BExAnalyzer.xla itself. Therefore you have to modify BExAnalyzer.xla to load the stuff you want when it's opened by BExAnalyzer.exe. But it may be (and I'm sure it is) prohibited by the license agreement and by the way you will lose this file's digital signature trying to save the modified BEx addin (don't hesitate to make the backup first).
This is the code to insert to ThisWorkbook module of BExAnalyzer.xla if you dare:
Private Sub Workbook_Open()
    On Error Resume Next
        Application.Workbooks("YourAddin.xla").Saved = Application.Workbooks("YourAddin.xla").Saved
        ' If YourAddin.xla addin is not loaded (and we get an error in the line above), then open it
        ' and run addin automacros because the event doesn't fire when opening addin this way:
        If Err.Number = 9 Then
            Application.Workbooks.Open(Application.UserLibraryPath & "YourAddin.xla").RunAutoMacros (xlAutoOpen)
    On Error GoTo 0
End Sub
The YourAddin.xla is supposed to be in standard addin folder (%AppData%\Microsoft\AddIns)

Similar Messages

  • The BEx Analyzer cannot generate VBA code due to the security settings

    Hello experts,
    when I try to open a query in BEx Analyser I get this error message for each Item of the Query:
    Diagnosis
    The BEx Analyzer cannot generate VBA code due to the security settings.
    System Response
    VBA code is not generated.
    Procedure
    Choose Tools -> Macro -> Security.
    On the Trusted Publishers tab page, select Trust access to Visual Basic project.
    Choose OK.
    Close the BEx Analyzer and continue working as before.
    Access to Visual Basic project is only needed when generating VBA code.
    This only takes place in design mode or when 3.x workbooks are upgraded.
    Of course I did exactly what was recommanded in the "procedure-section" of this error message. But BEx ist still not working!
    I use SAP NetWeaver 7.0 together with MS Excel 2007
    Thanks
    Axel

    Hello experts,
    I am an additional person interested in the way this issue was solved.
    I confirm that the issue is coming from the SP2 of Microsoft Office (I have another environnement without the SP2 and everything works well), and I am in a situation where I can't remove the update.
    Regards
    Guillaume P.
    EDIT :
    Solution found : I applied the bi710sp10p_1001-10004472.exe patch
    (downloaded via the download maanger : Support Packages and Patches - Entry by Application Group" SAP Frontend Components" BI ADDON FOR SAP GUI" BI 7.0 ADDON FOR SAP GUI 7.10)
    Edited by: GUILLAUME PETIAUX on Apr 13, 2010 10:29 AM

  • Remove Tabs and Add picture in BEx analyzer

    Hi All,
    Our customer runs the query through BEx analyzer. when they run the query , it shows the author name (The person who created Query) and Status of data ... They don't want to see that.. they also wanted to add pictureof their company in the Report.
    If i create a web template then how it will applied to query in BEx analyzer. and if i have 8 to 10 different queries then do i need to have to create 10 different web templates ?
    please give your valuable inputs on this..
    Regards,
    BI NEW

    You can create a custom web template and make it the default template so that that template gets called for any query.
    Default templates have been discussed in great detail in the forums - search the forums on the same and you will get what you want....

  • Sapbex.xla!toolsEdit error with BEx Analyzer

    I get 'sapbex.xla!toolsEdit' error when i try to run BEx Analyzer.
    Anybody has faced this problem.
    Thanks
    Arun

    Arun,
    possible that your SAP GUI was not properly installed and also that macros are enabled in the system...
    Please give your front end SP levels..
    Arun
    Hope it helps...

  • BEx Analyzer not run in office 2007

    Dear all,
    We are using BI version 7.0 in BEX gui (frond end pc) windows vista and office 2007 is used when I go to business explorer and run Analyzer then its call excel but not open any file or sheet, then in excel I go to excel  Add-ins menu -
    BEx Analyzer -
    open Query  then saplogon menu appear  I choose BI give my user name password then I choose infoarea---XXXXX-----XXXXX   that mean I open info area then
    The error occur.
    "  A critical program error has occurred. The program will now terminated, Please refer to the trace for further information"
    Trace information
    Tracefile SAPBEX.trc opened at 10/28/2008  11:06:07 AM
    User () at system ()
    Component Excel-AddIn(Version 3500.11.051) active at 10/28/2008  11:06:08 AM
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:                - isConntected: false     
    XLA:           11:06:09 registryGet failed     
    XLA:                - entry: chooseTemplate=?     
    XLA:           11:06:09 registryGet failed     
    XLA:                - entry: chooseTemplate=?     
    XLA:           11:06:09 registryGet failed     
    XLA:                - entry: chooseTemplate=?     
    XLA:           11:06:09 registryGet failed     
    XLA:                - entry: showErrors=?     
    Thankx
    rayyan

    Hi,
    Check your support package and patch level of your BEx Suite. BI 7.10 Support Package 6 Patch 1 works fine with Excel 2007.
    You might also want to check your installation using the file "sapbexc.xla"  on your hard drive. You should find it in C:\Program Files\SAP\FrontEnd\Bw or similar, although i'm not quite sure this works with BI 7...
    Bye

  • Open another workbook with a button in Bex Analyzer

    Hi,
    is it possible to create a button in a workbook in Bex Analyzer which opens another (specific) workbook in a new window?
    Or is there another easy way to open a specific workbook in Bex Analyzer.
    Best regards.

    Hi,
    You can configure excel to open each document (e.g. workbook) in a own window, within options (display ->windows on taskbar).
    You can also have 2 excel windows logged on to different BW systems (e.g. QA and PRD) bij opening not Bex but Excel for the second session and opening the BW Addin mannuelly via the Extra's -> addin menu...
    How to open a specific workbook is beyond my current knowledge..
    Regards, Patrick Rieken
    Message was edited by:
            Patrick Rieken - BI-Formance B.V.

  • Macro not working in BEx Analyzer

    Can you please explain why my Macro is not working?
    We're on BI 7 with Excel 2007. I have done the following:
    1) Open Workbook from BEx Analyzer and the result display on the worksheet. The was inserted in C10 and therefore, the result was display from C10 onwards.
    2) I have created a Macro with the following code:
    Sub Macro1()
    ' Macro1 Macro
        Range("C5").Select
        With Selection.Interior
            .Pattern = xlSolid
            .PatternColorIndex = xlAutomatic
            .Color = 65535
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
    End Sub
    3) When click to run the Macro manually, I can see the color of C5 is changed.
    4) Now I have include this Marcro in Workbook Setting ->Exits tab, Run Macro on Refresh. Here I enter my Marco name.
    5) In Workbook Setting ->General tab, I also set the Refresh Workbook on Open option.
    6) I have also set the Trust Center setting: select Trust access to the VBA project and Enable all macros.
    7) Then I save the Workbook.
    8) when I re-open the Workbook, the color of C5 is not change!!!
    Can you please help.

    Aglukas,
    Thanks again. I understand the name of the Macro can be anything and this is how to create the Macro:
    1) Run workbook, the query result display on the screen.
    2) In Excel 2007, I click on Developer tab ->Macro.
    3) Enter Macro name (Macro1) and click on Create button.
    4) I have VB editor open with following:
    Sub Macro1()
    End Sub
    5) So added the following code to Macro routine in VBA Module:
    Sub Macro1()
    With ThisWorkbook.Sheets("Sheet1")
    Stop
    .Activate
    .Cells(15, 1).Interior.Color = RGB(220, 254, 250)
    End With
    End Sub
    6) I then added the Macro1 to Workbook Setting ->Exit tab, and click on Add Macro button.
    When I run/refresh the workbook, I didn't get into debug mode at all!!!
    What is wrong in above steps?
    Please advice, thanks.

  • SAP BEX Analyzer Set values for variables

    Please help us out in sorting out this problem,
    We are automating BEx Analyzer for a Testing Project with Quick Test Professional (QTP) a functional automation tool uses VB script.
    Problem:
    There are 5 steps in automation
    Invoke BEx Application
    Log in to BEx server
    Run Query
    Set values for Variables for Query
    Display Report
    We are able to do 1,2,3 steps using BEx API functions and running BEx macros but we struck up with 4th step,
    1. Invoke BEx Application
    ‘Launch Excel
    Dim app
    Set app = createobject("Excel.Application")
    ‘Make it visible
    app.Visible = true
    ‘Attach add-in to Excel file
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SetStart")
    2. Log in to BEx server
    Login to Bex server
    Function logonToBW(app)
    Dim myConnection
    Dim logonToBW2
    On Error Resume Next
    logonToBW2 = True
    ' Create logon to system with following user and system details
    Set myConnection = app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! SAPBEXgetConnection")
    With myConnection
    .client = "600"
    .User = "USERNAME"
    .Password = "Welcom123"
    .Language = "en"
    .systemnumber = "00"
    .System = "BWDCLNT600"
    .systemid = "BWD"
    .ApplicationServer = "156.158.7.161"
    .SAProuter = ""
    .Logon 0, true
         If .IsConnected = 0 Then
               .Logon 0, False
    If .IsConnected <> 1 Then
    MsgBox "Automatic logon failed. Please enter your username and password in the next screen ..."
    Exit Function
    End If
    End If
    End With
    ' Run connection query to see if connected
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXinitConnection")
    logonToBW2 = True
    End Function
    3. Run a Query
    app.Run "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! runQuery", "ZZCCA3_M01_Q0003"
    Till here the script is running fine then the “Select values for Variables” window is displayed.
    This is where exactly we struck up; in this window we need to select values.
    Name of the Fields
         Field Name     Technical name of characteristic     Variable Name     Value
    1     Company Code                     0COMP_CODE     ZM_COMPCODE     1000
    2     Cost Center Hierarchy          0COSTCENTER     ZS_CCTRN     1000MDON
    3     Cost Center Node     0COSTCENTER     ZS_CCTRN     1000COP
    4     Cost Element          0COSTELEMENT     ZS_COELN     1000GDON_6999
    5     Fiscal Year     0FISCYEAR     0P_FYEAR     2007
    To select values for variables, we are trying below code but its giving an error,
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000”, "0COMP_CODE"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000MDON”, " 0COSTCENTER "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000COP”,  "0COSTCENTER"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000GDON_6999”,  "0COSTELEMENT "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “2007”,  " 0FISCYEAR"
    Any help highly appreciated, thanks in advance.

    Hi Reinhard,
    Pleas look at this:
    Passing a range to SAPBEX.XLA!SAPBEXSetFilterValue
    Best regards,
    Eugene

  • 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

  • BI 7.0 Bex Analyzer not working with excel 2007

    Hi All,
    I have installed the BEX 7.0 with MS office 2007 but the Analyzer is not working. The open file symbol does not give any option on the click.
    Please help.
    Regards,
    Abhishek

    Hi Abhishek,
    This is a BEX Add-in problem.
    Follow the below step....
    1. Copy the Tool
    2. Change the Tool.xls into the Tool.xla
    3. Copy the Tool.xla file
    4. Open My Computer window
    5. Navigate to the following folder
    a. C:\Program Files\Common Files\SAP Shared\BW
    b. Paste Tool.xla file into this folder
    6. Open Bex Analyzer
    7. Open a Query or Workbook
    8. Click on the u201CToolsu201D Menu on the Top
    9. Select u201CAdd-Insu201D from the Tools menu
    10. Click Browse from the Add-Ins window that opens
    11. Browse to the file you just saved
    a. C:\Program Files\Common Files\SAP Shared\BW\ Tool.xla
    b. Click Ok to continue
    12.The Tool for Excel should not be checked in the Add In window
    13.Click Ok to continue
    14. Close
    15. Re Open Bex Analyzer
    16. The Tool command should be displayed at the top of the Tool Bar
    17. Close Bex Analyzer
    18. Open Excel
    19. The Tool command should be displayed as well at the top of the Tool Bar.
    Hope this helps...
    check the below link 
    http://www.sytecpa.org/software/BWInstructions/Installing%20the%20SAP%20BEx%20Analyzer%20Excel%20Add-In.pdf
    Regards
    KP

  • Run RFC FM from BEx Analyzer

    Hello everybody!
    I have to implement call of function module via RFC from BEx Analyzer.
    I created a VBA macros:
    Set BI_connect = Run("BExAnalyzer.xla!sapBEXgetConnection")
    If BI_connect.IsConnected <> 1 Then
       If BI_connect.Logon(0, False) <> True Then
          MsgBox "Logon failed"
          Exit Sub
       End If
    End If
    It works but it shows logon window twice: first when user open a workbook and second when run this macros. I want the second authorization to be silent.
    But if I set BI_connect.Logon(0, True) then Logon function returns 4 (missing parameter).
    How this problem can be solved?

    Hi,
    normally the function "BExAnalyzer.xla!sapBEXgetConnection" should deliver the existing SAP Connection (as of SAP). You should use the "BI_connect.Logon" only if there is no connection to the SAP Server yet. Are you getting (BI_connect.IsConnected = False)?
    If you want to use "BI_connect.Logon(0, True)" it should be possible in this way:
    Set myConnection = 'Run("BExAnalyzer.xla!sapBEXgetConnection")
    With myConnection
    .client = "600"
    .User = "USERNAME"
    .Password = "PASSWORD"
    .Language = "en"
    .systemnumber = "00"
    .System = "BWDCLNT600"
    .systemid = "BWD"
    .ApplicationServer = "156.158.7.161"
    .SAProuter = ""
    .Logon 0, true
          If .IsConnected = 0 Then
                 .Logon 0, False
    If .IsConnected <> 1 Then
    MsgBox "Automatic logon failed. Please enter your username and password in the next screen ..."
    Exit Function
    End If
    End If
    End With
    You will get another connection in this case, disadvantage is, that you should define the whole connection params in your vba code ...:(
    Regards,
    Kirill

  • BeX-Analyzer - color more levels of hierarchy

    Hi,
    i have a hierarchie with 10 levels and i would like to give each level a different color. Using Analyzer i am only able to set different colors for the first 4 levels. Excel offers the following style sheets for this:
    SAPBEXHLevel0
    SAPBEXHLevel1
    SAPBEXHLevel2
    SAPBEXHLevel3
    Is it possible to have more style sheets like:
    SAPBEXHLevel4
    SAPBEXHLevel5
    Thanks,
    Holger

    well, defining my own style sheet wouldn´t help much, because the problem is that BeX Analyzer marks all hierarchy levels bigger than 4 with SAPBEXHLevel3. If i define a style sheet for SAPBEXHLevel4 this wouldn´t work, because the elements of hierarchy level 5 are still marked with SAPBEXHLevel3. Somehow i need to tell BeX Analyzer to mark level 5 elements with style sheet SAPBEXHLevel4, level 6 elements with SAPBEXHLevel5 etc...i guess this is done somewhere in the SAPBEX-Add-In?

  • 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

  • BEX Analyzer 3.5 Expired Certificate / Digital Signature

    Hey Everyone,
    Are any of you experiencing this? Expired Digital Signature issue for BEX Analyzer (sapbex.xla).
    We are on SAP GUI 7.10 patch 8, and BEX 3.5 Add-On patch 4. When users
    go to launch the BEX Anlayzer or open broadcasted reports, they get an
    error saying Digital Signature is Invalid or has Expired.
    This is because of the certificate that is provided with SAPBEX.XLA, expired on 3/6/09.
    I looked into relavent notes 492364, and 929716 which come with older certificates. We do not want to enable macros completely.
    Thanks!
    Imran

    Hi Imran,
    After Opening your Bex analyzer or in Excel
    Excel goto -- tools macrosecurity--Security level Tab --choose *Medium* option after setting this open your bex analyzer again you will get a pop up for *enable or disable macros* you can choose disable macros,
    now you will be able to open the Bex analyzer and run queries
    IF you are not still able to use or if you dont want *enable macro / disable macro* pop up then use
    this setting,
    Excel goto -- tools macrosecurity--Security level Tab -- choose Low option
    you will not get any pop ups and you will get the select query option.
    Hope this solve your issue.
    Edited by: suresh on Mar 12, 2009 2:21 AM

  • Error when starting Bex analyzer

    Hi All!
    We have a world wide BW-SEM application. In one country they get the following error message when starting Bex analyzer:
    <install error> Missing ActiveX component: Business Explorer Global Services
    Does anyone have a hint on what to do?
    Thanks for your help!
    Best Regards
    Pontus

    hi
    try to check with SAPBEXC.xla
    and take a look oss note 585643
    may need to manual register .dll with regsvr32
    Do an Installation check of the BEx Analyzer as follows:
    In the bex analyzer menu, Business explorer -> Installation Check -> Once the excel sheet opens, press the start button to start the check. Check the entries in red to see any missing/old ocx, dlls.

Maybe you are looking for

  • How Do I Get Portable?

    Sorry, this is long and involved, but here's my story:  I'm using PSE4 (yes, 4!) on an old desktop PC running Win XP.  I know I'm on borrowed time, so I need to make some changes (soon!).  I'm fairly comfortable and competent with Windows and PSE (at

  • Exception: java.lang.ClassCastException: HTTPClient.HttpURLConnection

    Hi All, I am getting below exception when I am trying to establish HTTPS connection using Exception: java.lang.ClassCastException: HTTPClient.HttpURLConnection sometime my code works and some time it gives me this exception below is the exception whi

  • Decode and case statement in the update..

    Its is more to it, but I want to check with you guys, the experts on this, this look busy to me, it should be a more simplify way of doing it, do you think will work The government decide to change the ethnic codes, and we have to come with certain r

  • TS Name is not displayed against BS Name in SLD

    Hi Friends, In SLD (PI 7.0), under Business Systems wizard, for each business system name, technical system is not displayed (Integration Tab --> Technical system) But, when we go to Technical System wizard, under Business System Tab Business System

  • Album removed from Spotify's selection

    The album "Holy Wood" by Marilyn Manson was removed from Spotify completely. I am trying to find out why. Is it temporary, or permanent. If so, why? I mainly signed up for spotify because of Marilyn Manson, so I need to know so I can decide whether t