我想使用Excel VBA创建到SAP的静默SAP.FUNCTIONS连接。每当我设置密码时,连接对象就会被丢弃。这有可能吗?
Sub Connect_to_SAP()
Dim myConnection As Object
Set myConnection = CreateObject("SAP.Functions.unicode")
With myConnection
.Connection.System = "SID" 'Systemname
.Connection.client = "800" 'Client
.Connection.APPLICATIONSERVER = "192.111.222.333"
.Connection.user = "MYUSERNAME" 'User
.Connection.Password = "MYPASSWORD" ' <=== after that, myConnection.connection object is trashed
.Connection.Language = "EN" 'Language
.Connection.systemnumber = "00" 'Systemnumber
End With
'Establish connection.
If myConnection.Connection.logon(0, True) <> True Then Exit Sub
'System Logoff
myConnection.Connection.LOGOFF
End Sub注:这是在SAPGUI7.6 pl4下。我们使用MYSAPSSO票证(门户单点登录)连接到pl6为7.60的SAP。
发布于 2020-10-14 00:57:40
为了测试静默连接是否在7.60 pl4下工作,下面是我的步骤。
这可以很好地工作。它仍然不能让我直接将用户的密码字符串转换为SAP所需的加密密码。尽管如此,这确实证明了静默登录确实可以在7.50+下工作,而这正是我最初的目标。
https://stackoverflow.com/questions/64252702
复制相似问题