I have a Problem with a Remote Function CALL and .net...
Im using Visual Studio 2010 Professional with OCX Components to connect to SAP and call ABAP Functions.
I have this Problem Only when i try tun run it as a Service. As a Application i have no problems...
Private saplogon As New SAPLogonCtrl.SAPLogonControl
Public sapcon As SAPLogonCtrl.Connection
Private sapfuncctrl As New SAPFunctionsOCX.SAPFunctions
saplogon.ApplicationServer = "CSAPEP20"
saplogon.System = "EP2"
saplogon.Client = "100"
saplogon.User = "RFCUSER"
saplogon.Password = "******"
sapcon = saplogon.NewConnection()
If sapcon.Logon(0, True) = True Then
sapfuncctrl.Connection = sapcon -
> here i got the Error BAD VARIANT TYPE
End If
Please can somone help me??
Thank you!!
Edited by: Zagan Nicu on Jan 3, 2011 12:52 PM
Edited by: Zagan Nicu on Jan 3, 2011 12:53 PM