cancel
Showing results for 
Search instead for 
Did you mean: 

How to invoke RFC in .Net2003

Former Member
0 Kudos

Hello, I am new to integration between SAP and Non-SAP, now I want to call a RFC from my windows application which develop in .net 2003, then, which dll(API provide by SAP) should I consume in my application? Or if is there anyway to help me call RFC? thanks in advance!

Appendix(The code for call rfc in my application now):

Dim Functions As Object

Dim Connect As Object

Functions = CreateObject("Sap.Functions")

Connect = Functions.Connection

Connect.ApplicationServer = "172.20.45.101"

Connect.Client = "800" '

Connect.Language = "ZH" '

Connect.User = Trim("USER-16") '

Connect.password = Trim("xxx") '

Connect.SystemNumber = "00" '

If Not Connect.Logon(0, True) Then '

MsgBox("logon fail", vbOKOnly + vbExclamation, "fail")

Else

Dim RFC As Object

Dim Vbeln As String

RFC = Functions.Add("ZGTS")

RFC.Exports("P_DATE") = CDate("1997.01.21")

RFC.Imports("P_HEADER") = Vbeln *'This code raise a error "Type is not equal"*

If RFC.Call Then

MessageBox.Show("Succeed")

Else

MessageBox.Show("Fail")

End If

End If

Connect.LogOff()

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Kindly refer this link for more details.

https://websmp203.sap-ag.de/~form/sapnet?_SHORTKEY=00200797470000050068&;

Regards,

Govind.

Edited by: Govindaraju A on Jun 23, 2008 10:52 AM

Answers (0)