cancel
Showing results for 
Search instead for 
Did you mean: 

how to invoke RFC module from .NET?

Former Member
0 Kudos

Hi Friends,

we are trying to call an RFC function module using .NET code. From .NET we are successfuly able to connct to SAP system, using .net connector class . However we are not able to invoke the function module. Its possible that i m not using right method in .NET connector class. we are not using proxy class for this connection.

Can any body pls send me a code, which can help me to invoke RFC function module.

Thanks in advance.

Hardik

Accepted Solutions (0)

Answers (1)

Answers (1)

rima-sirich
Advisor
Advisor
0 Kudos

Hi Hardik,

You can read about using SAP .NET Connector 2.0 here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/dotnet/

PDK%20for%20.NET/Developer's%20Guide%20PDK%202.0%20for%20.NET/index.html

1. Programming with PDK for .NET -> Connecting to SAP NetWeaver Systems ->

Using SAP connector for .NET

2. Tutorials -> Accessing SAP NetWeaver Systems

You can find here usefull information even if you don't develop with PDK for .NET.

Regards,

Rima.

Former Member
0 Kudos

Hi,

Thanks for a reply. I will appreicate if u could send me a sample code. I have found one code here

project1.testrfc rfc = new testrfc();

string conn = "CLIENT=100 USER=user PASSWD=init LANG=ZF ASHOST=192.168.0.31 SYSNR=0";

SAP.Connector.Connection connection= new SAPConnection(conn);

rfc.Connection = connection;

rfc.Connection.Open();

rfc.Z_TESTRFC(MATNR);

rfc.Connection.Close();

Can u tell me if this could be useful, to a function module z_testrfc?

thanks again,

Hardik

Former Member
0 Kudos

can anybody help me regarding this?

Former Member
0 Kudos

Hardik,

Can you explain your problem more?

Former Member
0 Kudos

Hi Hardik,

the code that you have written is true to connect and call function. Also, you should have Z_TESTRFC function and this function should have remote enabling property is set. If you have some other problems, you should explain more.

Former Member
0 Kudos

Hi,

Please look at the code in this links...

http://help.sap.com/saphelp_nw04/helpdata/en/51/d5470940fd564b888f4beb9523fa6c/content.htm

Hope it helps you.

Regards,

Maheswaran.B

Message was edited by: Maheswaran B

0 Kudos

All of the examples(.NET Connector) use an RFC called RFC_Customers_Get. The system I am connecting to does not seem to have that. Does it need to be added or should it be standard. The system is a 5.0 version.