Vba on bex analyzer 7.0 to block cells
hi gurus
i have a workbook that contains 6 queries for planning, i need to block the cells that are not for planning, i mean characteristic row values so the user is not allowed to edit, just edit the key figures columns, i guess i have to write some vba code to achieve this, someone has done this before? any suggest?
regrads
joker
Is there a reason you cannot simply pre-set the Excel Protection for those columns ? If you wanted to use VBA to set the protection for those cells, you could.
Similar Messages
-
Dear Experts,
I'm running a BI query to extract data then used VBA code to import external data from another Excel file. After storing the external data in a variable, I'm having trouble getting back to my original worksheet using VBA command Windows("Step Pricing Query.xlsm").activate.
Query Name: Step Pricing Query
Workbook Name: Step Pricing Query.xlsm
I've checked the spelling and the file extension. It doesn't seem to work. I'm doing something wrong or my method is incorrect? Your help is appreciated.
Thanks,resolved.
-
Dear all,
simple question:
İn bex analyzer report shows as follows:
A -B - C- 120 usd -- 4 pc
- - D -120 usd- -4 pc
when its same char, it does not paste A again in the second line as it repeats.
Is there any chance we can tweak that in bex analyzer and excel fills every cell?
Thanks
Edited by: john mcquade on Jan 25, 2010 1:39 PM
Edited by: john mcquade on Jan 25, 2010 1:40 PMHi John,
In the BEx Query Designer open the overall settings for the query and uncheck "Hide Repeated Key Values" in the display tab.
BR
Stefan -
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
AxelHello 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 -
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,
HelgeI 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) -
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 werent 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. -
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,
SheilaHi, 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. -
Environment: BW 3.5
Hi all together,
I have a query with the following presentation hierarchy: top level are the continents and second level are the countries belonging to the specific continents.
Now I want to display the results in a chart as follows:
If the countries are hidden and only the continents are visible, then the results of the continents should be displayed in the chart. If I show the countries to one continent then I´d like to see in the chart only the values for the countries of this specific continent.
Is this possible with standard tool in BW or do I have to use VBA coding in Excel?
Thanks for help.
Greetings AnjaIt is possible to do the charts in the BEX Analyzer. For this you should have BI 7.0 with SP 13 and the configuration of BEX Analyzer to BI system.
If u give me u r mail id i will send some documents.
Assign points
Thanks and regards,
Syed
Message was edited by:
Shahid Syed -
Hey!
How can I create subtotals in BEx Analyzer?
Thanks a lot,
SabineSo you want a subtotal row for every 10 customers and there is no additional information to determine these customers (for example the 10 customers are all customers with a specific postal code)?
Which is your BW version? AFAIK you will have to go for Excel VBA macros if you are on NetWeaver2004 or below, in NetWeaver2004s it should work with Excel formula. I dont think there is an option to fulfill your requirement in Query Designer...
Best regards,
Björn -
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 -
Prevent BeX Analyzer from stealing focus while executing several queries
Hi all,
we have a vba program that runs several 3.5 queries in Excel (SAPBEXrefresh)
Does anyone knows a solution to prevent BeX Analyzer from stealing the focus each time a new query starts or completes.I too am trying to find solution to this very same problem.
I created a Excel VBA program to batch process BEx reports, which works great, but the users are finding that they can't work on anything else while the process runs, as BEx always returns the focus to the Excel window as each BEx report run is completed!
In our googling, we ran across the following thread, which I've found so far to have the most detailed discussion of this problem:
http://sap.ittoolbox.com/groups/technical-functional/sap-bw/sapbex-takes-focus-1188178?cv=expanded
Unfortunately, no final resolution was provided there, and the thread is over 2 years old, and it looks like the poster who was closing in on the solution hasn't logged in to that particular forum in 2 years as well.
But why don't you take a look at the link anyway, as it may give you some ideas. I will also continue to use that poster's ideas to try to work out a solution, and if I come across one, I will certainly share it with you. -
Hi,
In our company there is a very particular case with the Bex Analyzer and users are beginning to be impatient. We have checked everything, but I would like to confirm if it is to share something of SAP or Microsoft.
We have computers on the same terms of hardware and software, and installation of SAP Business Explorer with patches installed. In some computers it works well and in others, however, when you run the BEx Analyzer, it takes 4 minutes to open the Excel.
The computers have installed:
- Windows XP SP3
- .NET Framework 3.0
- Office 2003 SP3 and patch "office2003-KB907417-FullFile-ENU.exe".
- SAPGui 7.10 and patch "gui710_11-10002995.exe".
- Business Explorer patch "bi710sp08_800-10004472.exe".
Tests:
1. If we open the Excel without using the Analyzer, it works correctly.
2. After 4 minutes of delay in the initiation, Bex Analyzer works correctly.
3. BEX Analyzer have permissions to create dll's in the temporary folder: "c: \ Documents and Settings \ user \ Local Settings \ temp."
4. Uninstallation of Office and SAP, followed by the installation from scratch.
Thank you very much in advance.
I expect an answer.
A greeting.Hello,
We solved the issue :
When you start Some BEx components there is an internet call to verisign.net servers :
The BexAnalyser and all new Businex Explorer are trying to access internet each time we use them.
The CLR tries to contact CRL.VERISIGN.NET for updating the system list of revoked certificates.
On computers having an IP connectivity but where connecting to CRL.VERISIGN.NET is impossible (firewall or proxy blocking access for example), the launch time could take up to 5 minutes :
t0 : launch Analyzer
t1: triyng to access internet "CRL.VERISIGN.NET" : wait x seconds until timeout
t2 : retry to join CRL.VERISIGN.NET
t3 :retry again
after x tries the Analyser starts.
So you must find the way to tell the CLR not to contact the Verisign revocation
There is an option on Internet Explorer options : (advanced options on the IE Tools menu / Last tab):
Unselect the "update the list of revoked certificates", the restart the Bex, you will be happy
Hope this helps and solve your issue,
Regards,
Karim -
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!!
MichaelWhich 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 -
BEx Analyzer, Office 2007, Windows XP Issue
I am having a problem getting BEx Analyzer to work with Office 2007 on my Windows XP machine.
Configuration:
Windows XP SP2 with all Windows updates
SAPGui 7.10 with Patch 2
Office 2007
SAP NetWeaver BI 7.0 Stack 12
According to the <a href="http://https://websmp110.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000676672&">BEx Compatibility of MS Operating Systems and Office Products</a> my configuration should work. I am able to start BEx Analyzer and select a query to open, but then it fails on the load. I get the following error:
<b>A critical program error has occurred.</b>
Below is the trace log. Any help would be appreciated.
BExConnect.Trace3: 0
BExExcelTraceListener.AddTraceListener: Added a tracelistener for Version: 7100.0.461
BExConnect.constructor2: 99.53125
BExMenu.CreateSubMenu1: 0
BExMenu.CreateSubMenu2: 2.5
ListSeparator: ,
GetSystemInformation
SUNI Const: 0
CommunicationFactory.GetSystemInformation (Setting Conn 1)): 0.3125
CommunicationFactory.GetSystemInformation (Setting Conn 2)): 0.3125
CommunicationFactory.GetSystemInformation (Setting init Propties)): 0.3125
CommunicationFactory.GetSystemInformation (SUNI.FUNCTION_EXISTS)): 1.71875
RSR_XLS_RFCtrc: 9.84375
CommunicationFactory.GetSystemInformation (RSR_XLS_NET_INTERFACE)): 16.09375
CommunicationFactory.GetSystemInformation (XML Stuff)): 20.46875
CommunicationFactory.GetSystemInformation (Prop Stuff)): 20.46875
CommunicationFactory.GetSystemInformation (Version)): 20.46875
CommunicationFactory.ObtainSystemInformationandCheckVersion (GetSysInfo)): 20.625
CommunicationFactory.ObtainSystemInformationandCheckVersion (CheckAfterLogin)): 0.15625
CommunicationFactory.LogOnUsingComConnection (ObtainSystemInfo)): 20.78125
CommunicationFactory.LogOnUsingComConnection (MainConnectionChangedEvent)): 2.34375
CommunicationFactory.LogOn: 144.53125
RSR_XLS_RFCtrc: 0.625
BExThemes.LoadFromBackend: 4.84375
BExThemes.LoadFromBackend: 0
BExConnect.LogOn: 299.21875
RSR_XLS_RFCtrc: 0.625
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<?xml version="1.0" encoding="utf-16"?>
<I_T_SEARCH_ATTR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
RSR_XLS_RFCtrc: 1.25
openworkbook with param
OpenWorkbookGetTheMimeAndStoreItOnTemp
BExItems.CreateFromDeSer: Trying to deserialize the Items...
6/25/2007 7:54:58 PM----
System.NullReferenceException: Object variable or With block variable not set.
at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at com.sap.bi.et.analyzer.addin.BExExcelItem.SetDesignShape(BExParameter iParameter)
at com.sap.bi.et.analyzer.addin.BExExcelItem.Create(BExParameter iParameter)
at com.sap.bi.et.analyzer.addin.BExItemTextElement.Create(BExParameter iParameter)
at com.sap.bi.et.analyzer.api.BExItem.CreateInternal(BExParameter iParameter, BExApplication iApplication)
at com.sap.bi.et.analyzer.api.BExItems.CreateItem(BExParameter iParameter)
Object variable or With block variable not set.
at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at com.sap.bi.et.analyzer.addin.BExExcelItem.SetDesignShape(BExParameter iParameter)
at com.sap.bi.et.analyzer.addin.BExExcelItem.Create(BExParameter iParameter)
at com.sap.bi.et.analyzer.addin.BExItemTextElement.Create(BExParameter iParameter)
at com.sap.bi.et.analyzer.api.BExItem.CreateInternal(BExParameter iParameter, BExApplication iApplication)
at com.sap.bi.et.analyzer.api.BExItems.CreateItem(BExParameter iParameter)Hi Tyler,
Please check to make sure that you are on the correct support package.
For Microsoft Office and Vista support, you need to be on SAP NetWeaver support package <b>stack</b> 12, which is equivalent to SAP NetWeaver <b>BI support package 13</b>.
Please see https://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000674496& for the mapping of BI support packages to NW support package stacks.
See also https://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000676672& for Microsoft compatibility information.
Regards,
Katie Beavers
SAP NetWeaver Product Management
Maybe you are looking for
-
Rawtohex - How to Insert ? ORA-12899: value too large for column
Hi, Can any one please help me to resolve the following issue ? Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production Name Null? Type ABC_OID NOT NULL RAW(8) ABC_NAME NOT NULL VARCHAR2(30 CHAR) UPDATE
-
Hi, I'm using Oracle9iR2 database. I create a package procedure that loop through a list of jobs from user_jobs table and run it using dbms_job.run(jobid). Then I schedule this package procedure as a job (say JobA) itself to execute the above procedu
-
Syncing contacts across devices
Hi I'm having issues with trying to get one set of contacts to display across all my devices. Whereabouts do I create my master set of contacts and how do I then get that to be the same on my iPhone/laptop/iCloud/iPad? Currently after much frustratio
-
Have to re-enter WEP settings after every restart.
Every time I restart my computer I have to re-enter SSID and WEP key. Does anyone know how to fix it so that the settings will be remembered when the system restarts? Its connecting to a Netgear access point with 128bit WEP, and SSID broadcast turned
-
How to restore an older copy of Mac on my mac?
Hello everyone, a couple of months ago my macbook died from water damage. I haven't touched in a while and I turned it back on and it works... Now, I made a new fresh Mac start up with OS X Lion (as this is the default for my mac). I have on an exter