Show TOC Start of Content Area

Function documentation JCo RFC Destinations  Locate the document in its SAP Library structure

Use

The RFC is an SAP interface protocol, which simplifies the programming of communication processes between systems. The RFCs enable you to call and execute predefined functions in a remote system, or in the same system. The RFCs manage the communication process, parameter transfer, and error handling.

In the AS Java the RFC functions are implemented by the RFC Engine service, which is presented in the SAP NetWeaver Administrator under the name JCo RFC Destinations. This service is used for processing ABAP to Java requests. A feature is provided for receiving calls from the SAP systems – this is done by registering the AS Java as an RFC destination.

The RFC Engine service processes calls from the SAP systems. It dispatches the calls to a stateless session bean, which is registered in the AS Java naming system. By naming convention the JNDI name used is identical to the name of the SAP function module.

Technically, the service is based on the JCo (SAP Java Connector).

Integration

This section explains how the RFC Engine works within the AS Java environment.

RFC Scenario

This graphic is explained in the accompanying text

...

       1.      On startup the RFC Engine service connects to the Web AS repository.

       2.      On startup the RFC Engine service registers itself at the Gateway with a defined name. It is possible to register it under different names and at different Gateways.

       3.      The Web AS calls a function for the registered RFC destination.

This graphic is explained in the accompanying text

Make sure that the function is defined in the repository!

       4.      The Gateway forwards the call to the RFC Engine service.

       5.      The RFC Engine service looks in the JNDI for the EJB, which is registered under the function name.

This graphic is explained in the accompanying text

The name of the function must be identical with the JNDI name of the bean, that is, it is necessary to have a JNDI name. If there is no such name, the RFC Engine service will not be able to find the bean.

It is advisable for the beans to be written with a LocalHome interface.

       6.      The RFC Engine service calls the processFunction(JCO.Function) method of the EJB found.

       7.      The results of that call (the modified JCO.Function) are passed to the Gateway.

       8.      The Gateway passes the results back to the Web AS.

Features

The RFC Engine service uses a TCP/IP connection type. Hence, the destination must be created in the Web AS with a gateway host and gateway service for the particular system. Then, on the AS Java, the same destination with the same name, host, and service is created. For more information about registering destinations on AS Java, see Creating Destinations.

You then have to write a bean with a processFunction(Function <name>) method. When this bean is deployed you can call its function from inside the Web AS and specify input parameters depending on the tasks you want to perform. The bean receives these parameters, accomplishes the tasks, and returns the result, which will be displayed in the Web AS when starting the connection.

Security

The RFC Engine service supports SSO Tickets. That is, if in the ABAP environment the corresponding RFC destination is configured to send a SSO Ticket, during a Function Call “ABAP-J2EE Engine” this SSO ticket will be received. This will activate the process of authorizing the user. For more information, see Configuring the AS Java to Accept Logon Tickets.

The service also provides you the possibility to define particular RFC destinations to use Secure Network Connection (SNC). For more information, see Configuring an RFC Destination to use a Secure Network Connection (SNC).

 

See also:

Tracing JCo Calls

 

 

End of Content Area