on 12-14-2023 10:24 PM
For years, we've been using Excel VBA to perform various SAP RFCs.
We are now being forced to move to Office 64 bit, and eventually to Office 365.
According to SAP note 2724656, 64 bit versions of the NWRFC are supported under SAP GUI 770.
We have installed SAP GUI 770 with the optional 64 bit RFC controls and I have verified that new .OCX and .DLL files have been added to folder C:\Program Files\SAP\FrontEnd\SapGui. I also explicitly added the .OCX files into the VBA references list.
Sub Non_Unicode_Logon()
'-Variables-------------------------------------------------------
Dim SAPFunc, Connection, SAPConnection
Dim PingFunc, retPing, exceptPing
'-Get SAP.Functions-----------------------------------------------
Set SAPFunc = CreateObject("SAP.Functions")
If Not IsObject(SAPFunc) Then
MsgBox "CreateObject(SAP.Functions) failed", vbOKOnly, "Error"
Exit Sub
End If
'-Get SAP.LogonControl connection---------------------------------
Set Connection = SAPFunc.Connection()
If Not IsObject(Connection) Then
MsgBox "SAPFunc.Connection failed", vbOKOnly, "Error"
Exit Sub
End If
'-Set connection parameters---------------------------------------
Connection.client = "301"
Connection.Language = "EN"
Connection.User = "MRUPP"
'Connection.Password = "********"
'Connection.System = "PRD"
'Connection.HostName = "pxsyprd"
'Connection.SystemNumber = 0
'-Connect SAP system----------------------------------------------
SAPConnection = Connection.Logon(0, vbFalse)
If SAPConnection <> 0 Then
'-Call ABAP function module RFC_PING ---------------------------
Set PingFunc = SAPFunc.Add("RFC_PING")
If IsObject(PingFunc) Then
retPing = PingFunc.Call()
If retPing = False Then
exceptPing = PingFunc.Exception()
MsgBox CStr(exceptPing), vbOKOnly, "Result"
Else
MsgBox CStr(retPing), vbOKOnly, "Result"
End If
End If
'-Logoff--------------------------------------------------------
SAPConnection = Connection.Logoff()
Else
MsgBox "Connection.Logon failed", vbOKOnly, "Error"
End If
End Sub
When the code tries to connect to the SAP system, I get the expected pop-ups.
And then the following error message:
(note that is seems to still be looking at the Program Files (x86) folder.
Error Group
RFC_ERROR_COMMUNICATION
Message
LOCATION CPIC (TCP/IP) on local host with Unicode
ERROR SncPDLInit()==SNCERR_INIT Unable to load GSS-API DLL
named "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\gssntlm.dll"
TIME Thu Dec 14 11:50:23 2023
RELEASE 753
COMPONENT SNC (Secure Network Communication)
VERSION 6
RC -1
MODULE D:/depot/bas/753_REL/src/krn/snc/sncxxdl.c
LINE 462
DETAIL LoadLibrary("C:\Program Files (x86)\SAP\FrontEnd\SAPgui\gssntlm.dll")
I have discovered the root causes of my problem and reached partial success in resolving it.
In Excel, we were trigger SAP_Single_Sign_On by withholding several key pieces of logon information:
· User Password
· SAP SID (system ID)
· SAP Host Name
However, when all parameters are provided in the logon call, we bypass the need to load gssntlm.dllYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found the missing DLL file in SAP note 2115486.
It looks to me like I need GX64NTLM.DLL
However, there are 4 separate 64 bit DLLs depending on your Security & Processor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.