2010 Mar 08 11:50 AM
How to connect SAP using SAP System user through Visual Basic 6.0 and call RFC
I am connecting via SAP GUI user login. for that i am using following code (Using VB 6.0)
8----
Set ctlLogon = CreateObject("SAP.LogonControl.1")
Set oConnection = ctlLogon.NewConnection
oConnection.User = oRst.Fields(1).Value '"exe8698" 'Trim(oRst("USER_NAME"))
oConnection.Client = oRst.Fields(3).Value '"239" ' Trim(oRst("APP_CLIENT"))
oConnection.Password = oRst.Fields(2).Value '"globegm1" ' Trim(oRst("USER_PASS"))
oConnection.ApplicationServer = oRst.Fields(4).Value '"10.40.0.1" 'Trim(oRst("APP_SERVER"))
oConnection.Language = oRst.Fields(5).Value '"EN" 'Trim(oRst("APP_LANG"))
oConnection.SystemNumber = oRst.Fields(6).Value '"00" ' Trim(oRst("APP_NO"))
'logon to RFC Connection - Silent
booReturn = oConnection.Logon(0, True)
If booReturn <> True Then
gSIILConnect = False
Else
gSIILConnect = True
End If
*----
but i dont know how to use System user from vb
Can anybody please guide me
2010 Mar 08 12:16 PM
Hi,
First of all you need a connector to connect to SAP System like for Java there is Jco connector. After successful connection you can call RFCs and BAPIs.
Thanks,
Muhammad Usman
How to connect SAP using SAP System user through Visual Basic 6.0 and call RFC
I am connecting via SAP GUI user login. for that i am using following code (Using VB 6.0)
8----
Set ctlLogon = CreateObject("SAP.LogonControl.1")
Set oConnection = ctlLogon.NewConnection
oConnection.User = oRst.Fields(1).Value '"exe8698" 'Trim(oRst("USER_NAME"))
oConnection.Client = oRst.Fields(3).Value '"239" ' Trim(oRst("APP_CLIENT"))
oConnection.Password = oRst.Fields(2).Value '"globegm1" ' Trim(oRst("USER_PASS"))
oConnection.ApplicationServer = oRst.Fields(4).Value '"10.40.0.1" 'Trim(oRst("APP_SERVER"))
oConnection.Language = oRst.Fields(5).Value '"EN" 'Trim(oRst("APP_LANG"))
oConnection.SystemNumber = oRst.Fields(6).Value '"00" ' Trim(oRst("APP_NO"))
'logon to RFC Connection - Silent
booReturn = oConnection.Logon(0, True)
If booReturn <> True Then
gSIILConnect = False
Else
gSIILConnect = True
End If
*----
but i dont know how to use System user from vb
Can anybody please guide me
2010 Mar 08 12:16 PM
Hi,
First of all you need a connector to connect to SAP System like for Java there is Jco connector. After successful connection you can call RFCs and BAPIs.
Thanks,
Muhammad Usman
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |