Good morning Experts
I was hoping to find out how to do a couple of things that are far more difficult than I had imagined.
1. Automate Variable Entry
This was a seemingly easy thing to do in BW 3.5 using SAPBEXsetVariables, however, I cannot seem to get this to work with the BExAnalyzer.xla instead of SAPBEX.xla as there is no Queries sheet to reference!
The idea is very simple: I have 3 common variables that I want to automatically populate on refresh or button click (either works for me). These variables will be user defined in the existing spreadsheet and will be a WBS Element (ZMIWBSE), Fiscal Year (ZOSFISCY()) and Fiscal Period (ZOSFISCP()).
How do I go about doing this, or is it even possible?
2. Automatic Logon on a system with SSO
Currently, when users open BEx they have to Connect, check their system (if it's not the default), then OK the final box which will have automatically populated their credentials (but NOT password as this is done using SSO).
I cannot find a way to modify the following script to alow for a SSO based logon and would love to know how, if it is possible:
Dim myConnection As Object, ws As Worksheet
'log in to BW server
Set myConnection = Run("BExAnalyzer.xla!SAPBEXgetConnection")
With myConnection ' call the connection
' Set parameters for logon
.client = "X"
.user = Environ("username")
'.Password = "thisisnotmypassword" ' Commented out as it shouldn't be needed
.Language = "EN"
.SystemNumber = "No#"
.System = "System"
.applicationserver = "server.server.server.net"
.UseSAPLOgonIni = False 'important for automatic connection
.logon 0, True ' This will prevent dialog from appearing
If .IsConnected = 1 Then ' I'm not sure about the = as it was not in the original code, but equally doesnt compile without
'initiate BW session
returnVal = Run("BExAnalyzer.xla!SAPBEXinitConnection", myConnection)
'note: unlike other BEx API, this one returns a Boolean!!!
Any help would be greatly appreciated as this has been bugging me for weeks now!
Edited by: Darren Williams on Nov 10, 2010 9:53 AM