Results 1 to 2 of 2

Thread: SAP RFC Calling in VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    1

    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

  2. #2

    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.
    Regards,
    mas
    -----------------------
    Excel & VBA - http://sapass.metro.client.jp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width