Bex analyzer macros

Hi,
Is there any macro in the bex analyzer that allows you to delete columns in a report (workbook)??
In the columns of the report is showing an amount to a date, that date is a variable selection querie, so that shows you many columns (amount) as dates have been leaked, but there are certain amounts of a certain date not I want to be shown, would have a chance to do this on excel macros or using another utility of bex, or querie designer???
Greetings,

if I understand the question correctly, then you can just exclude the specific dates that you don't want in the report.  you would do it through the filter ability either in the query designer or the analyzer
Regards,
Pavel

Similar Messages

  • Bex analyzer macro

    Hello Gurus,
       To use BEx Analyzeru2019s API, you need a particular macro as well as references to the type
    libraries. how to use these macro by example?
    Many thanks.

    Hi,
    I can give you the logic for your requirement. Place a contant value in a cell somewhere user can't see. On closing write a macro to set the value to that cell and also at time of opening.
    Regards,
    -Vj

  • Bex Analyzer macro to change workbook settings

    Hi,
    I need to create a macro on event workboobk before close in order to force the value of the workbook setting : "refresh when the workbook is open"even if the user manually change the value
    how can i achieve this
    Thanks in advance for your help

    Hi,
    I can give you the logic for your requirement. Place a contant value in a cell somewhere user can't see. On closing write a macro to set the value to that cell and also at time of opening.
    Regards,
    -Vj

  • Drill Down Macro command BEx Analyzer BI 7.0

    Hi All,
    I'm having the following poblem. I'm working as a testautomation specialist having automated a test using (amongst others) the BEx Analyzer (SAP BW 3.X).
    In short, when the results of a query are shown in an excel sheet, I automated the vertical drilldown of every row in that resultssheet. I used the BEx Analyzer macro command: Run("sapbex.xla!SAPBEXfireCommand", "HDEX", myCell).
    Since we are going to use the new version of the SAP Bex Analyzer (BI 7.0), I have to convert/migrate all my testautomation scripts. And I just can not succeed in making this vertical drill down work in SAP Bex Analyzer 7.0. The SAPBEXfireCommand is not supported in SAP Bex Analyzer 7.0. Does anyone has an idea what SapBexAnalyzer (Excel) macro I can use to drill down in  SAP Bex Analyzer 7.0? Any help really appreciated, I'm really struglling with this one and also no luck finding any solution on the internet so far.
    Thanks!

    i'd suggest u research some oss notes.
    Take a look at the following:
    1073426
    1045244
    1039191
    these may not be exact solutions, but will guide you to other notes as well...

  • Error in Bex Analyzer including the filter button command in Callback macro

    Hello,
    I have the following problem with the function filter button in the Bex Analyzer included in the callback macro:
    Because of using 2 hierarchies in the filter the setting drill down to level 2 in the query gives no right output in the Bex Analyzer. The drill down level 2 is not shown. SAP recommends the include of a filter button to solve this problem. With a filter button in the sheet the problem was solved.
    But after including the filter button command in the callback macro I get an error in MS Excel.
    The callback macro starts, the filter was set by the user and the data was refreshed. Because of the refreshing of the filter the callback function the callback function starts several times. After setting the filter the first time, the following macro avoids the several starting of the set filter function:
    Sub CallBack(ParamArray varname())
    On Error GoTo err_handler
       Dim lRange As Range
       Set lRange = varname(1)
    'Filter entfernend/delete filter
    Dim ZeichenFilter As Long
    ZeichenFilter = Len(Sheet4.Cells(41, 3).Value)
    Dim Filter1 As String, Filter2 As String
    Filter1 = Left(Sheet4.Cells(28, 3), ZeichenFilter)
    Filter2 = Left(Sheet4.Cells(41, 3).Value, ZeichenFilter)
    If Filter1 <> Filter2 And Filter2 <> "" Then
        onAction = True
        onAction = False
    End If
    'Filter setzen mit einmaligem durchlaufen/set filter and run one time
    If onAction = False Then
        onAction = True
        Call Sheet4.BUTTON_55_Click
        onAction = False
    End If
    exit_handler:
        Exit Sub
    err_handler:
        MsgBox Err.Description, vbOKOnly, "Error in " & " setMusterSub"
        Resume exit_handler
    End Sub
    After the filter was set the callback macro starts the second time. Then the Bex Analyzer erros with the sandglass. The working on VBA is possible, but not the working with Bex Analyer . Values in Excel weren’t shown.
    How can I avoid this error?

    Once I am adding VAR_VALUE_1 to the static parameters, the system generates two messages error:
    Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    System error in program SAPLRRS2 and form GET_SID-1
    Best Regards,
    Hanit

  • 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.

  • Excel macro to launch Bex analyzer

    Hi,
    first of all congratulation to the forum. really interesting and useful.
    I am trying to write a macro that launches Bex analyzer from an excel template. 
    I have been trying with:
    Dim RetVal
    RetVal = Shell("C:\Program Files\....\BW\sapbex.xla", 1)
    with no success so far.
    has anybody got any suggestions?
    thanks in advance and best regards
    david

    Hello,
    R u working as Security consultant or BI developer.
    If you are a BI developer you dont have access to Auth objects S_RFC.
    If you are security consultant you have access and to look where for S_RFC.
    I dont know how your roles organaized.But try this way.
    1. gO TO TRANSACTION  SUIM
    2. select ROLES.
    3. Under roles select Roles by Complex Selection Criteria.
    4. Under this go to 4 th box Selection by profiles and Authorization Objects
    5. enter S_RFC in Authorization Object.
    and execute.Then you get all the roles in which S_RFC is there.
    Then see the roles of the user for whoom RRMX does not work.
    and match the role to the selection criteria and make the changes to S_RFC in the role.
    generate role and save.
    If you are not security consultant u dont have access to any of these.
    Consult u r basis or security team and tell them to check the values of S_RFC.
    Getback if u have any questions.
    Abhiram

  • Which macros does BEx Analyzer use? How to call the refresh macro?

    Hi everybody,
    I would like to get an overview about which macros the BEx Analyzer uses, espacially the macro which is responsible for refreshing the workbook. I want to know what BEX Analyzer is doing when I open the variable screen, I assume there is an SAP macro that opens the variable screen?? I tried to look in the online help at help.sap.com but couldn't find a list of macros.
    The idea behind this is, that I have a BEx workbook with 5 queries in it. A colleague now wnats to write a VBA code that calls the variable screen, enters  company 1, period and year, runs the workbook and saves it. Then opens the variable screen again, enters company 2, period year, etc etc etc......
    What my colleague needs to know is which macro he has to call for the workbook refresh / variable screen in order to make his VBA coding.
    Many thanks in advance!!
    Michael

    Which version of Bex are you using ? Bex 3.5 or Bex 7 ? This will significantly affect the answer.
    For Bex 3.5, here is some useful information;
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55f9e09411d2acb90000e829fbfe/frameset.htm
    Edited by: Charlie Belt on Jun 7, 2011 9:12 AM

  • How to save BI report into normal excel sheet in Bex Analyzer

    Hi Experts,
    version of  Bex Analyzer:
    Bi addon 7.x
    support package 7,patch 1
    version 7004.4.0.5
    excel-2003
    when i am trying to save the report into excel in Bex Analyzer as below:
    file-save as->Microsoft excel work.
    when I open excel I am getting pop up windowu201Dthis file contains macros  with an expired or revoked signature.Since your running under  high security level,these macros will be disabled.u201D
    when I click ok I am getting one more pop upwindow as u201Cmacros  are diabled because the security level is set to high and a digitally signed trusted certificate is not attached to macros.to run the macros,change the security level to a lower setting(not recommended),or request the macros signed by the author  using a certificate  issued by a certificate authority.
    what are these macros? why i am getting this pop up windows
    When i opened  the excel report is not looks like general excel report.how can I generate general excel report .I should not want to get excel report as in bex analyzer.I donu2019t want to have author ,status of data,chart,filter,information in excel report.
    what settings I have to made to save the report in general excel format.
    As i am new to Bi please correct me if i am wrong.
    Anything is appreciable.
    regards,
    naresh.

    Macros in general are nothing but piece of code in excel.
    To allow unsigned macros to run, the Trust all installed add-ins and templates check box must be selected on the Trusted Publishers tab of the Security dialog box. This option is selected by default. If it is not selected (recommended), Excel allows you to run only macros that have trusted digital signatures.
    1. On the Tools menu, point to Macro, and then click Security.
    2. On the Trusted Publishers tab, select the Trust all installed add-ins and templates check box.

  • 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

  • Problem in executing query in browser and bex analyzer

    i am not able to execute query in browser nor bex analyzer...
    problem is that i dont have option to run in bex analyzer in query designer (menu bar seems missing in query designer and how can i get enabled
    and when execute the query in browser using bex query designer ..it prompts me with following error
    URL http://saperpdev.saperpdev.com:8002/sap/bw/BEx call was terminated because the corresponding service is not available
    Note
    ■The termination occurred in system ERD with error code 403 and for the reason Forbidden.
    ■The selected virtual host was 0
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:SAPERPDEV_ERD_02-v:0-s:403-r:Forbidden
    and i tried to open the query from bex analyzer  level
    it prompts me as follows
    macros are disabled because the security level is set to high and digitally signedtrusted certificate is not attached to the macros,to run the macros change the security level to lower settings
    pls suggest me

    hi suman,
    thanks for your response.. but let me be more clear
    i am using sap gui 7.20 front end and when i execute rrmx i am able to navigate to BEx analyzer but when i tried to open a report which i create i get following error message..
    you do not have sufficient authorization for infoprovider zic_proj
    function module  /SDF/AL_MAP_TRANSID_LOGH doesnt exit
    second thing is that i tried from bex query designer to execute the report ..but i am not able to execute the report...
    i hope some connections seems missing..please let me know what to do ASAP..
    and where can i post this question to get fast reply

  • BEx Analyzer: How to optimize reporting over a hierarchy?

    Hello there,
    using BEx Analyzer & Excel, we're reporting over a large hierarchy of cost centers, beginning at the top level and then looping over 166 different cost centers in that hierarchy.
    Looping works from within a macro, calling the SAPBEXSetFilterValue for the corresponding query.
    Reporting takes about 5 hours at the moment. Is there any way to speed up the calculation after setting the cost center as a filter value? Example: we need to report the top level node anyway, so the query needs to calculate over all hierarchy nodes. What happens to the results of the lower level nodes? Are they just dropped and calculated again later when the cost center of that lower level node is set as filter value? It would be a good thing if BW could cache these results so that it just needs to download them when needed later instead of calculating again.
    Any idea? I don't now very much of BW concerning that point, so any hint is very welcome. Our release is BW 3.1.
    We already tried RSRT but all we could do is to set the behaviour in case of query navigation. I'm not quite sure if this covers the case we want (setting the new filter value). At least, execution of that report still takes about 5 hours.
    Thank you very much.

    Andreas,
    Create Aggregates on Hierarchy level.
    Use Read mode H.
    Make use of OLAP CACHE.
    Have a look at RSRCACHE.
    Regards,
    Ramkumar Ghattamaneni.

  • Bex Analyzer 7.0 - BexEventHandler in Netweaver 2004s

    Hi, I noticed that in Bex Analyzer 7.0, there is a new class called BexEventHandler which gets hit each time I select a cell or a worksheet within my VBA code.  This did not happen in Analyzer 3.5.  And because of this, I am experiencing major performance issue in my macro.
    I have a workbook that contains 10 queries (10 worksheets) and a VBA code that merges all the data from the queries into 1 single worksheet.  Upon conversion to 7.0, my code is now running extremely slow as it is always going to the BExEventHandler class at each cell.select or sheet.select.
    Does anyone know how to bypass this BexEventhandler in Bex Analyser 7.0??
    Would appreciate any feedback you can provide.
    Thanks,
    Sheila

    Hi, I found the command in VBA that does disables the Bex event handler code.
    Application.EnableEvents = False
    Set this to false before your code starts and set it to true again after your code.

  • Drop-Down-Box (F4 Input Help) for formula variable in BEx Analyzer (BI 7.0)

    Hi Gurus,
    is it possible to get a drop down box for a ready for input formula variable in the BEx Analyzer (not BEx Web!)?
    We want to let the users choose scaling factors 1, 1000 or 1000000 (implemented via this formula variable). In the settings of the formula variable you can only choose a default value but there seems to be no option to provide all three factors in a drop down box like the ones for characteristic value variables.
    We could prevent other entries in the variable pop up via customer exit (i_step 3) but the business is wishing an F4 input help like the ones for characteristic values.
    Thanks for your help,
    Marco

    Hi Macro,
    Its not possible to get drop down box for a ready for input formula variable. Because it is possible only for characterstic value variables but not formula variable.u donnot get any drop down box like ready for input for formula variable.
    Regards,
    Premalatha.C

  • Here is a solution for BEX analyzer NW04S layout - setFilterStyle

    Hi all,
    I had a problem with a workbook that contains multiple sheet with differebts queries.
    The problem was, that the filter panel had the same style on each sheet. And like the number of charactéristics are different for each quey, the layout was not well.
    To correct this :
    - I have modify the  'setFilterStyle'  macro   and now, the filter panel is displayed correctly on each sheet.
    I hope this solution will be able to help you ...
    Regards,
    Martine
    Here is the modified macro:
    '--- Reformat the Filter Area with the correct stlyes
    Sub setFilterStyle()
    Dim i As Integer
    Dim lRange As Range
    Dim lsheet As Worksheet
    On Error Resume Next
    'i = 16
    'Calculate Filter-Area
    'While Sheet4.Cells(i, 3) <> ""
    '   i = i + 1
    'Wend
    'Filter Area
    For Each lsheet In ThisWorkbook.Worksheets
        i = 16
        While lsheet.Cells(i, 3) <> ""
            i = i + 1
        Wend
      If lsheet.Range("C14").Value = "Filter" Then
        Set lRange = Range(lsheet.Cells(15, 3), lsheet.Cells(i - 1, 4))
        lRange.ClearFormats
        With lRange.Borders(xlEdgeBottom)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
        With lRange.Borders(xlEdgeRight)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
         With lRange.Borders(xlEdgeRight)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
        With lRange.Borders(xlEdgeLeft)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
         With lRange.Borders(xlEdgeTop)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
        With lRange.Borders(xlInsideVertical)
                .LineStyle = xlContinuous
                .Weight = xlThin
                .ColorIndex = 47
        End With
        lRange.Interior.ColorIndex = 2
      End If
    Next lsheet
    ' No more filter Area
    For Each lsheet In ThisWorkbook.Worksheets
        i = 16
        While lsheet.Cells(i, 3) <> ""
            i = i + 1
        Wend
    If lsheet.Range("C14").Value = "Filter" Then
      'Calculate Filter-Area
        l_old = i
        While lsheet.Cells(l_old, 3) = "" And l_old <= 200
            l_old = l_old + 1
         Wend
         Set lRange = Range(lsheet.Cells(i, 3), lsheet.Cells(l_old - 1, 4))
         lRange.ClearFormats
      End If
    Next lsheet
    End Sub
    '--- Service Function to get the Name Object back
    Private Function getName(i_name As String) As Name
       Dim l_name As Name
         For Each l_name In ThisWorkbook.Names
            If l_name.Name = i_name Then
                Set getName = l_name
            End If
         Next l_name
    End Function

    Hello,
    You can set the default workbook as the SAP standard provided.
    To do this, please open the BExAnalyzer and goto the
    "Global settings" screen (Its on the BExAnalysis Toolbox menubar).
    In the "Select Default workbook" tab click on the "Use SAP Standard"
    button.
    This would set the default workbook. Close Analyzer and reopen it.
    It should work fine.
    Some additional information for you:
    The default workbook that is used can be seen in table RSRWBTEMPLATE.
    Check the workbook that is assigned to your user. If there is a blank
    workbook assigned to your user, this uses the SAP Standard Global
    Wokrbook. If your user iD doesn't exist in this table, then it will use
    the workbook assigned to the <blank> user id. If the <blank> user id is
    assigned to <blank> workbook, this means that any user id that doesn't
    have an entry in this table will be use the global workbook. Don't make
    any manual updates to this table, but it can be used to see who is
    assigned to what workbook. You should specify using the standard workbook
    for your user id through the properties in the BEx Analyzer. Ensure that
    the entry is updated in this table. Also, you will need to close BEx
    Analyzer and log back on to see the change.
    Regards,
    Manjunath

Maybe you are looking for