Using the Client Interface to Make an RFC Call 

Purpose

Programming with the Java RFC Class Library allows you to make a call to an RFC function module.

Using the client interface you set the various parameters of the function module you wish to call, and then you issue the RFC call.

Prerequisites

Specify middleware type to use with the Java RFC.

Note that you set up the middleware type through the Java RFC properties files. You also use the same properties files for setting up the connection parameters. We suggest that you set up the properties files only after reading all the topics regarding setting the properties files, specifying middleware type, and setting up the connection (the first step below).

Process Flow

The following steps describe the process of making an RFC function call using a single connection.

  1. You must first set up the connection and start a session.
  2. An RFC call requires a connection an R/3 system. The Java RFC Class Library provides the SessionManager class for managing all the aspects of the connection to R/3. You set up the necessary connection information and then you let the SessionManager object handle the connection.

    1. Obtain the SessionManager object.
    2. Set up connection information in SessionInfo of the SessionManager.
    3. You can use the r3_connection.props properties file to define the various connection parameters, in which case the connection information is automatically set in SessionInfo. See Using the Properties Files to Set Up SessionInfo.

    4. Use the Open method of the SessionManager to start a session.
  3. Prepare the IRfcModule and its parameters.
    1. Obtain an IRfcModuleFactory object.
    2. Create an IRfcModule object with all of the parameters of the RFC function module.
    3. You can auto-create the IRfcModule object, or you can manually create it.

      If you manually create the IRfcModule object, you need to create and add all of its parameters.

    4. Set the value of any required or desired import parameters.
  4. Make the RFC call.
  5. Retrieve returned export and table parameter values.
  6. Close down the connection using the Close method of the SessionManager.

You can close down the connection immediately after calling the function module even before checking the value of the export parameters.

The following diagram summarizes the process of making an RFC call with the client interface.

See Also

Follow the links for the various individual steps within this process to see the details and an example of each of the steps.

Also see Programming Multiple Connections for how to call RFC functions within different connections.