RFC
Processing with the RFC Adapter
The RFC adapter enables you to process and execute RFCs (Remote Function Calls) using the Integration Engine and the PCK.
Processing RFC calls using the Integration Engine is an alternative means of processing XML messages that are generated using the proxy interface. This alternative is an option for all SAP applications that already use RFC calls, as well as for new applications of SAP components that do not yet have access to the proxy generation functions.
For more
information about RFCs see
RFC
Basics.
You do not need to change existing applications, but you must maintain all sender systems that use the RFC adapter in the System Landscape Directory. You also require an RFC connection of type TCP/IP to the RFC adapter. At this RFC destination, you must register the program ID for the sender adapter that you specified when you configured the sender adapter.

You cannot send IDocs using this RFC connection. You must send IDocs to the RFC destination of the IDoc adapter.
The RFC adapter
uses the connection data for the metadata repository to access the required
metadata of the called function modules. To do this, a user must be maintained
for the
SAP
Java Connector (JCo).
The metadata repository is not necessarily located in the sender system. It can also be provided by another SAP system.
To establish an RFC destination for the RFC adapter, proceed as follows:
...
1. Call the transaction Display and Maintain RFC Destinations (SM59).
2. Select an existing RFC destination of type ABAP Connections (for example, ABAP_Old) by double-clicking it.
3. Choose Destination ® Copy and copy the RFC destination using a new name (for example, ABAP_New).
4. Save the new RFC destination (ABAP_New) and delete the old RFC destination (ABAP_Old).
5. Create a new RFC destination (for example, RFC_Adapter) of type T (TCP/IP connection) as the RFC destination for the RFC adapter.
6. Select the registration type Registered Server Program and in the Program ID field enter the corresponding program ID from the configuration of the sender RFC adapter.
7. In the Gateway host and Gateway service fields, enter the gateway host and gateway service from the configuration of the sender RFC adapter.
8. If the sender system is a Unicode system, define the RFC destination as Unicode.
9. Using the name of the old ABAP connection (ABAP_Old), create a new RFC destination of type L (logical destination with reference entry).
10. In the Reference Entry field enter the RFC destination (RFC_Adapter) for the RFC adapter.
Under the name of the old RFC destination (ABAP_Old) – formerly an ABAP Connection, now a Logical Destination – the system calls the new RFC connection (RFC_Adapter) of type TCP/IP Connection for the RFC Adapter.
The change to the target address (RFC destination) is transparent to the application but it alters the semantics of the RFC connection.
To return to the old destination, simply change the reference entry in the logical destination (ABAP_Old), for example from RFC_Adapter to ABAP_New.
The communication between the Integration Server/PCK and the receiver system does not require an RFC connection or parameters from the configuration of the RFC adapter.
The communication channels from the Integration Directory or the PCK determine the respective receiver systems.
The connected systems generate the RFC calls in the applications and send them to the RFC destination of the Integration Engine or the PCK.
The RFC adapter is called at the inbound channel of the Integration Engine/PCK. It uses the SAP JCo to generate an RFC XML document (XML message) from the RFC metadata and transfers it for further processing.
A message ID is created for each RFC XML document and a message comprising a header and payload (with the RFC XML document) is sent to the Integration Engine/PCK.

Each message only contains one RFC call.
Incoming RFC XML documents are only persisted if they are based on a tRFC call (asynchronous message processing). Synchronous RFC calls (sRFCs) are only persisted if logging is activated.
The RFC adapter at the Integration Engine outbound channel requires a communication channel from the technical routing for each receiver from the logical routing.
You define this communication channel during configuration of the receiver adapter in the Integration Directory. It is analyzed and provides the technical information for the RFC call.
The RFC adapter does not make any special demands on mapping. It simply requires an RFC XML document in a format that is supported by the SAP Java Connector. This document either already exists or must be generated by using a mapping.
The system calls the RFC adapter and transfers the RFC XML document (XML message) with the communication channel parameters.
The task of the RFC adapter at the Integration Engine/PCK outbound channel is to convert RFC XML to a valid RFC call and to execute this call.
In the case of a synchronous RFC call, the result of the call is accepted by the RFC Adapter, converted to XML (RFC XML response) if necessary, and returned to the Integration Engine/PCK for further processing.