Start of Content Area

This graphic is explained in the accompanying text Simple RFC Server

This console application is a simple RFC server implementing the SAP function RFC_CUSTOMER_GET. Our .NET implementation, returns two customers back to the SAP system and prints out the parameters sent to us by the SAP call.

This sample illustrates:

·        Use of a Windows Console application with the connector

·        A simple RFC Server

·        Calling a .NET server from SAP

·        Command line parameters for connecting to SAP gateway

·        Using the RFC Server host with the same connection information for each server

This sample uses command line arguments to connect to the SAP gateway (for example,
 
–aMYPROGID –gLOCALHOST –xSAPGW00), where  –a is the program ID used in your TCP/IP destination, -g is the gateway host and –x is the gateway service.

You can set the command line arguments in the Visual Studio .NET debugger by right-clicking on the project RFCServerConsole and selecting Properties     Configuration properties    Debugging    Command Line Arguments.

 

Before calling this RFC server in the SAP system, you must have setup a TCP/IP destination in your SAP system (type registration). You can call this sample RFC server by running RFC_CUSTOMER_GET in single test from the RFC function builder (transaction SE37) inside of the SAP system, with the destination of your TCP/IP destination. Alternatively, you can write an Abap/4 program as described in Calling RFC .Net Server from SAP Programs.   

An example ABAP/4 program is provided in this sample’s “ABAP” directory.

 

End of Content Area