Quantcast
Viewing all articles
Browse latest Browse all 2067

Using VBA to Run SAP Bex / BW

Hi guys,

 

can you please help me how to automate VBA to Bex connection.

i am trying below code but its keeps asking the login credentials when i m refreshing .

 

Function logonToBW(app) As Boolean

 

 

Dim myConnection  As Object

Dim logonToBW2  As Boolean

Dim bsilent As Boolean

bsilent = True

 

On Error Resume Next

logonToBW2 = False

' Create logon to system with following user and system detailsk

app.Run ("BExAnalyzer.xla!SetStart")

Set myConnection = app.Run("BExAnalyzer.xla!SAPBEXgetConnection")

With myConnection

.client = "100"

.user = "1233231"

.Password = "xxxxx"

.Language = "EN"

.systemnumber = 0

.System = "xx"

.systemid = "xx"

.UseSAPLOgonIni = False

.GroupName = "xxxxxxxxxx"

.MessageServer = "xxxxxxxxxxx"

.ApplicationServer = "1231231231"

.SAProuter = ""

.logon 0, True

End With

 

 

' If logon fails, bring up text and exit function

If myConnection.IsConnected <> 1 Then

.logon 0, False

MsgBox "Automatic logon failed. Please enter your username and password in the next screen ..."

Exit Function

End If

 

 

' Run connection query to see if connected

app.Run "BExAnalyzer.xla!SAPBEXinitConnection"

logonToBW2 = True

 

 

 

 

i dont want pop up to come when i refresh...


Viewing all articles
Browse latest Browse all 2067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>