cancel
Showing results for 
Search instead for 
Did you mean: 

SAP .NET Connector Connection Test

917

Hi everyone,

I'm using the SAP .NET Connector 3.0 to replace old software that used the librfc32.dll.

In the past, with the librfc32, we had a notification on the GUI of our software that logged whenever an SM59 connection test has been performed.

I was not participating in the development of those functions but I was searching for a possibility to do that with the SAP .NET Connector 3.0.

I could not find any information in the documentation of NCo about how to do that. I was expecting something like an event that I can listen for, as the documentation clearly says that fundamental requests like RFC_PING are handled internally by the engine itself.

Does anyone know if that is possible?

Accepted Solutions (0)

Answers (2)

Answers (2)

Hi Roberto,

I read the SAP documentation and I cannot find any information about that so far. The only event handlers that exist are for error handling and state change handling but there does not seem to be a way to recognize an incoming SM59 connection test...

roberto_forti
Contributor
0 Kudos

Hi Jacques, Following SAP specification. Regards.

roberto_forti
Contributor
0 Kudos

Hi Jacques,

Have you read SAP documentation ?

Regards,

roberto_forti
Contributor
0 Kudos

Hi Jacques, Following SAP specification. Regards

"Processing Incoming RFC Calls The RfcServer class finally is the class receiving and processing the incoming RFC requests: public class RfcServer In addition to the configuration object, the RfcServer class provides read-only Properties for a set of most important parameters. For processing an incoming function call, you need to implement a class (of arbitrary type) and add a method of same type as the delegate RfcServerFunction to this class. public delegate void RfcServerFunction( RfcServerContext ctx, IRfcFunction function) Annotate the method with an attribute of type RfcServerFunctionAttribute . public class RfcFunctionAttribute : System.Attribute There are two ways to set this attribute: • [RfcServerFunction (Name = "STFC_CONNECTION" )] In this case NCo executes this server function, whenever a request for function module STFC_CONNECTION comes in. Or more general, this allows providing a server function for one particular function module. • [RfcServerFunction (Default = true )] In this case NCo executes this server function, whenever a request for a function module, which does not have an explicit server function bound to its name, comes in. It is possible to mix both variants. So you could have three server functions explicitly designed to handle function modules A, B and C, and a fourth “default” server function, which handles all other incoming function module requests. Also note that NCo already contains nine server functions to handle the following system level function modules: • RFC_PING, RFC_SYSTEM_INFO, RFC_DOCU – used by SM59 • ARFC_DEST_SHIP, ARFC_DEST_CONFIRM, API_CLEAR_TID – used by the backend for transmitting tRFC/qRFC LUWs. SAP Online Help 15.01.2018 SAP .NET Connector 3.0 16 • BGRFC_DEST_SHIP, BGRFC_DEST_CONFIRM, BGRFC_CHECK_UNIT_STATE_SERVER – used by the backend for transmitting bgRFC LUWs."

0 Kudos

Hi Roberto,

I am aware of this specification. It does not reveal any possibility to capture RFC_PING. I tried "overriding" it by attributing a function as RFC_PING but that did not work.

roberto_forti
Contributor
0 Kudos

Hi Jacques,

I suggest contacting stefan.schnell.

I believe that him will help you figuring it out.

Regards

Hi Roberto,

I contacted Stefan Schnell and he said he is also not aware of any way to capture rfc ping calls in SAP NCO. I guess I have to live with it the way it is 🙂

Regards

Jacques