on 06-27-2016 1:56 PM
have a Excel VBA which connects to SAP, pulls some data and does some processing on it. It was working fine with SAP GUI 7.20. But it stopped working when I installed SAP GUI 7.40. My code is as below :
Dim obBAPICall As Object ' * Create object Set obBAPICall = CreateObject("SAP.Functions") . .
I get following error :
I've already gone through some weblinks and I believe I've all the required references. (In fact, I've added many more in order to troubleshoot the problem).
My SAP GUI version is :
For your information -
Following code does not have any problem :
Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
Any help is highly appreciated.
Thank you.
Okay, the problem is solved. The issue was w.r.t. MS Office version. I restored the MS Office the VBA works fine. The issue was because of some roll out of the MS Office updates by IT admin folks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a similar issue, having also just updated from 7.20 to 7.40, my script will no longer connect Excel to SAP. The basic part of the script is:
Sub SAP_Connect_basic()
If Not IsObject(SAPguiApp) Then
Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
End If
If Not IsObject(Connection) Then
Set Connection = SAPguiApp.OpenConnection("<text string in Logon pad describing the connection>", True)
End If
If Not IsObject(Session) Then
Set Session = Connection.Children(0)
End If
End Sub
If you run the script once, you get popup from MS Visual Basic:
Run-time error '1000':
SAP Logon connection entry not found.
If you terminate it and run it a second time, you get a new error:
Run-time error '601':
Sapgui cannot be initialized.
I can modify the script slightly so that it will run as long as SAP is already open, but I need the script to be able to open SAP automatically (which it did prior to the update with no issue).
We're on file version 7400.2.7.1112, build 1635946, patch level 7.
Any help woud be fantastic.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.