We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-scripting-l] Excel to SAP Connection

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by rafal_s (Global Applications Security Specialist )
on Dec 6 at 5:28 AM
Hi Guys,

Problem solved! As it appears wdtlog.ocx file was missing from c:\Program Files\Common Files\SAP Shared\
Once I copied it there from a different machine and registered it everything started working :)

Thanks again for all your help.

---------------Original Message---------------
From: rafal_s
Sent: Friday, December 02, 2011 11:26 AM
Subject: Excel to SAP Connection

Hi guys,

I am trying to connect to SAP from Excel. I have this bit of code in my macro:

Sub SAPConnect()

Dim sap
Set sap = CreateObject("SAP.Functions")

sap.Connection.User = "user"
sap.Connection.Password = "password"
sap.Connection.Client = "xxx"
sap.Connection.Systemnumber = "xx"
sap.Connection.System = "xxx"
sap.Connection.ApplicationServer = "xxxx"
sap.Connection.Language = "EN"
sap.Connection.GroupName = "xxxx"
sap.Connection.MessageServer = "xxxxxx"

Unfortunately I am not able to connect at all.
I get a run-time error "1001" Failed to return dispatch object right after Set sap = CreateObject("SAP.Functions")
I have searched the web a lot and most of the macros I could find use similar code for the connection.
This code used to work on SAP GUI 6.40; it stopped working as soon as my GUI was updated to 7.20.
Any ideas on how I need to modify the code?

__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Mark as helpful
View this online
  
Popular White Papers

In the Spotlight
SAP BusinessObjects: Dashboards and Analytics. Learn more about this Toobox.com Marketplace online course.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language