Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creat RFC Connection

Former Member
0 Likes
483

Hi I am trying to connect .NET plat form to sap as follows

R3 = CreateObject("SAP.Functions")

R3.Connection.Client = "200"

R3.Connection.System = "RDV"

R3.Connection.ApplicationServer = "172.21.1.46"

R3.Connection.SystemNumber = 1

R3.Connection.Language = "E"

R3.Connection.User = "KANISHKA"

R3.Connection.Password = "LOG"

R3.Connection.Logon(0, True)

If R3.Connection.IsConnected Then

FBFunc = R3.add("ZCALL_DATA") ' RFC IN ABAP

' ' BELOW ALL ARE IMPORTING PARAMETERS OF RFC

FBFunc.exports("MANDT") = "200"

FBFunc.exports("COMPANY") = "1000"

FBFunc.exports("FMONTH") = "12"

returnFunc = FBFunc.Call()

MsgBox("Connected")

End If

can any one tell me how to create a RFC function for it??

thanks

kanishka

1 REPLY 1
Read only

Vijay
Active Contributor
0 Likes
323

hi

rfc can be created in transaction se37.

to cerate YOUR RFC follow following steps.

1. goto transaction se37.

2. IN ATTRIBUTES tab select remote enabled radio button.

2. enter the fm name and press create.

3. in import tab specify the fields you want to pass as input to fm and can make field optional as well by pressing optional checkbox.

4.under export tab specify fields you want fm to return.

5. under tables specify tables u want to use or change.

6. under source code write code for your fm.

7. activate .

regards

vijay

reward points if helpful