cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding Server Stub

elko_hasse
Participant
0 Kudos

Hi,

If I create a server program with .Net Connector wizard I also have to choose a RFC-Function module from the connected SAP. But why? With a Server I want to implement functionallity outside from SAP (that is not available in SAP). So in genereal there is no Function module available in SAP for that.

Or do I have to understand the RFC Function module in SAP as a template for creation of the Classes in VS.

That means I just define the Interface of a RFC-Function module in SAP (without any ABAB code) and use it as a template with the .net Connector wizard.

Am I right ?

Thanks

elko

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

> Or do I have to understand the RFC Function module in

> SAP as a template for creation of the Classes in VS.

>

> That means I just define the Interface of a

> RFC-Function module in SAP (without any ABAB code)

> and use it as a template with the .net Connector

> wizard.

Exactly. Somewhere the Metadata for the function (thus the name, parameter types and so forth) must come from.

elko_hasse
Participant
0 Kudos

Thanks,

another quick question to the expert:

Why is the function implemented in the server declared as "Protected" ? How is it accessible from SAP ?

elko

reiner_hille-doering
Active Contributor
0 Kudos

The magic is in the base class (SAPServer). It's when a request comes in, it searches it's members for a method with the fitting AbapName (using reflection). As everything can be cached, it's fairly fast.

The methods are protected, as they are only accessed from within the class - mainly from the base.

elko_hasse
Participant
0 Kudos

Thanks,

helps me understand the technique inside better.

elko

Former Member
0 Kudos

I Have a question on this topic.

I wrote a C# Program without using the Wizard. And i can start the server. I am also able to run methods in C# i defined by <i>CALL FUNCTION 'xxx' DESTINATION p_dest...</i> But if i won't specify all the parameters of the method correctly, SAP does not jump into my method. Do I alway have to specify the AbapName of the parameters? And is there a RfcType for the C# object type?