|
Code to connect SAP using BAPI from other applications |
|
|
|
|
Written by P. Renjith Kumar
|
|
Thursday, 17 May 2007 |
This gives the code that is used to establish connection between SAP and other applications using BAPI Active X Controls :
The code to illustrate the steps involved when the BAPI ActiveX Control is used to access BAPIs . · Creating a BAPI ActiveX Control object Set oBAPICtrl = CreateObject(“SAP.BAPI.1”) · Creating a logon control object: Set oLogonCtrl = CreateObject(“SAP.Logoncontrol.1") · Creating a connection object to the R/3 System: Set oBAPICtrl.Connection = oLogonCtrl.NewConnection · Logging on to R/3 System by calling the logon method of the connection object: If oBAPICtrl.Connection.Logon(frmStart.hwnd,FALSE) = FALSE Then MsgBox"R/3 Logon Connection failed" End Endif
Related Items:
|
|
Last Updated ( Thursday, 17 May 2007 )
|