The following section explains how you can write your own JCo programs for servers if you use the standalone version of SAP JCo.
A JCo server program implements functions that are called up by an RFC client. The JCo server program is registered via the SAP Gateway and waits for inbound RFC calls.
· An RFC server program registers itself under a program ID to an SAP gateway (not for a specific SAP system).
· If an RFC call is passed on from any SAP system to this SAP gateway with the option “Connection with a registered program” (with the same program ID), the connection takes place with the corresponding JCo server program.
· Once an RFC function has been executed, the JCo Server waits for further RFC calls from the same or other SAP systems.
· If an RFC connection is interrupted or terminated, the JCo server automatically registers itself again on the same SAP gateway under the same program ID.
· You are using the standalone version of SAP JCo.
· Using transaction SM59, you have defined a destination with connection type T (TCP/IP connection) in the SAP system.
· You have chosen the registration mode (“Registered server program” option under the “Technical settings” tab page) for this destination.
· The destination contains the required information about the SAP gateway and the registered RFC server program.
The following sections provide examples of how to program various JCo server functions: