cancel
Showing results for 
Search instead for 
Did you mean: 

RFC to a .NET Windows Service

Former Member
0 Kudos

Please help as I am a newbie to SAP. I have tried searching through the forums but have not found what I need.

I have a .NET solution that consists of a windows service written in VB.NET (Project 1) and I have used the SAP Connector to create a proxy to the RFC in SAP (Project 2). The RFC will be passing in some string variables that the windows service will process.

When the RFC is called from SAP, does that call the proxy which then calls my windows service or do I need to write some sort of listener that gets started in the service's OnStart() that uses the proxy?

Dave Hodgkins

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hello David,

you need a windows service and build in an SAPServer, that can receive the call from the SAP system. If your service starts, than the SAPServer must connect to the gateway. Now your SAP system can call the functions inside your SAPServer. For the connection between your service and the SAP system you have to create a destination with a SM59 transaction (of TCP/IP). Define there your own program ID and specify the SAP host and gateway. Your server then can be configured with these parameters. See my posting .

Regards

Holger

Former Member
0 Kudos

Hi Dave,

how r u doing ?

>>When the RFC is called from SAP, does that call the proxy which then calls my windows service or do I need to write some sort of listener that gets started in the service's OnStart() that uses the proxy?

when the windows service is invokes the RFC [using SAP NCo], it does so by using SOAP

the librfc32.dll will take care of all your communication needs. all you need to do is ensure a open channel [port should not be blocked]

with respect,

amit

Former Member
0 Kudos

Dave,

If I am understanding correctly. If you are talking about a windows service (like the one found under services on your local machine) then you would start your service. Once the service is started then the program can call your SAP RFC functions and retrieve the information you need.

Is the windows service and the SAP connection program two seperate programs? If this is the case you might want to create a socket program or have a way to interacting both programs.

Hope this helps