Skip to Content
0
Former Member
Apr 24, 2007 at 05:32 AM

how to connect sap thru vb

26 Views

hi All,

i tried to connect sap from vb as .

my vb code is ( i write this vb code on form load event)

Dim Funct, MyFunc As Object

Dim oTable, oRow As Object

Dim Result As Boolean

Set Funct = CreateObject("SAP.Functions")

Funct.Connection.System = "BSSLDEV"

Funct.Connection.client = "500"

Funct.Connection.user = "username"

Funct.Connection.Password = "pwd"

Funct.Connection.Language = "EN"

If Funct.Connection.logon(0, True) <> True Then

MsgBox "Login error"

Exit Sub

End If

Set MyFunc = Funct.Add("Z_TEST")

Set oTable = MyFunc.Tables("DATA")

Result = MyFunc.Call

now it gave login error.

can you gave me any more solution or tel where i'm wrong.

what should be in

Funct.Connection.System =

system name / it ip / or something else

thanks

mukesh