Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_schnell
Active Contributor
Since a long time SAP offers the ActiveX RFC Controls - wrapper around the classic RFC library (LibRFC [ANSI] and LibRFCU [Unicode]).

You can use this ActiveX Controls without SAP GUI for Windows installation very easily.

Copy for ANSI the files:

  • wdobapi.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtaocx.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtfuncs.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtlog.ocx - from directory Common Files\SAP Shared

  • librfc32.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment

  • convlib.dll - from directory Common Files\SAP Shared with SAP GUI 7.40

  • sapfewut.dll - from directory Common Files\SAP Shared with SAP GUI 7.40

  • sapfilecache.dll - from directory Common Files\SAP Shared with SAP GUI 7.40

  • saplgmgr2.dll - from directory Common Files\SAP Shared with SAP GUI 7.40

  • sapmime.dll - from directory Common Files\SAP Shared with SAP GUI 7.40


Copy for Unicode the files:

  • wdobapiU.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtaocxU.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtfuncU.ocx - from directory SAP\FrontEnd\SAPgui

  • wdtlogU.ocx - from directory SAP\FrontEnd\SAPgui, with SAP GUI 7.40 from directory SAP\FrontEnd\SAPgui\Unicode

  • librfc32u.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment

  • icudt34.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.30

  • icudt50.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.40

  • icuin34.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.30

  • icuin50.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.40

  • icuuc34.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.30

  • icuuc50.dll - from directory system32 on 32-bit and from syswow64 on 64-bit Windows environment with SAP GUI 7.40

  • convlib.dll - from directory SAP\FrontEnd\SAPgui\Unicode Shared with SAP GUI 7.40

  • sapfewut.dll - from directory SAP\FrontEnd\SAPgui\Unicode Shared with SAP GUI 7.40

  • sapfilecache.dll - from directory SAP\FrontEnd\SAPgui\Unicode Shared with SAP GUI 7.40

  • saplgmgr2.dll - from directory SAP\FrontEnd\SAPgui\Unicode Shared with SAP GUI 7.40

  • sapmime.dll - from directory SAP\FrontEnd\SAPgui\Unicode Shared with SAP GUI 7.40


Also you need the Microsoft VC runtime libraries VC2012, this means VC 11, e.g. from here.

Store this libraries in different sub directories, e.g. ANSI and Unicode, and register the ocx libraries. Now you can use the SAP ActiveX RFC Controls e.g. in VBA or VBScript, without an installed SAP GUI for Windows.

Here a VBScript example:
'-Begin-----------------------------------------------------------------

'-Directives----------------------------------------------------------
Option Explicit

'-Sub Main------------------------------------------------------------
Sub Main()

'-Variables-------------------------------------------------------
Dim SAPFunc, Connection, SAPConnection, PingFunc, retPing
Dim exceptPing

'-Get SAP.Functions-----------------------------------------------
Set SAPFunc = CreateObject("SAP.Functions.Unicode")

If Not IsObject(SAPFunc) Then
MsgBox "CreateObject(SAP.Functions.Unicode) 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 = "001"
Connection.User = "BCUSER"
Connection.Password = "minisap"
Connection.Language = "EN"
Connection.System = "NSP"
Connection.HostName = "ABAP"
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--------------------------------------------------------
Connection.Logoff()

Else
MsgBox "Connection.Logon failed", vbOkOnly, "Error"
End If

End Sub

'-Main----------------------------------------------------------------
Main()

'-End-------------------------------------------------------------------

 

Addendum 2017/05/20:

With the SAP GUI for Windows 7.50 offers SAP new ActiveX libraries which bases on SAP NetWeaver RFC Library. Here the necessary files from an x64 Windows installation:

  • wdobapiU.ocx - from directory SAP\FrontEnd\SAPgui\Unicode

  • wdtaocxU.ocx - from directory SAP\FrontEnd\SAPgui\Unicode

  • wdtfuncU.ocx - from directory SAP\FrontEnd\SAPgui\Unicode

  • wdtlogU.ocx - from directory SAP\FrontEnd\SAPgui\Unicode

  • SAPRfcWrapperU.dll - from directory Program Files (x86)\Common Files\SAP Shared

  • sapnwrfc.dll - from c:\Windows\SysWOW64

  • icudt50.dll - from c:\Windows\SysWOW64

  • icuin50.dll - from c:\Windows\SysWOW64

  • icuuc50.dll - from c:\Windows\SysWOW64

  • convlib.dll - from directory SAP\FrontEnd\SAPgui\Unicode

  • sapfewut.dll - from directory SAP\FrontEnd\SAPgui\Unicode

  • sapfilecache.dll - from directory SAP\FrontEnd\SAPgui\Unicode

  • saplgmgr2.dll - from directory SAP\FrontEnd\SAPgui\Unicode

  • sapmime.dll - from directory SAP\FrontEnd\SAPgui\Unicode


Also you need the Microsoft VC runtime libraries VC2013, this means VC 12. Register the ocx libraries and the SAPRfcWrapper.dll library.
24 Comments