|
-
Aug 10th, 2005, 11:16 PM
#1
Thread Starter
New Member
SAP RFC Calling in VB
Hi all!
As my subject says...we are developing a system in VB that is capable of calling function in SAP through RFC. I'm kinda new with VB.
For those who already tried this, just would like to ask what are the requirements for VB to be able to do RFC Calling with SAP. Do we need things such as SDK , OCx, DLL, etc...
If yes! May i ask what are these files needed.
Thanks!
Jimboy
-
Sep 8th, 2005, 07:55 AM
#2
New Member
Re: SAP RFC Calling in VB
Basically, you need to install saplogon with RFCSDK.
(which includes librfc32.dll and other requried .ocx modules.)
Then, can write a code like below which does login to SAP.
...
Dim sapConn as object 'Declare variant
Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
sapConn.Connection.user = "USER"
sapConn.Connection.password = "PASSWORD"
sapConn.Connection.client = "001"
sapConn.Connection.ApplicationServer = "127.0.0.1"
sapConn.Connection.Language = "EN"
If sapConn.Connection.Logon(0, True) <> True Then 'Try Logon
msgbox "Cannot log on to SAP"
end if
...
After logging on to SAP, you can call function module in SAP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|