Executing Communication Through the Sender RFC Adapter

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Execute communication through the sender RFC adapter

RFC Metadata Repository Parameters

The technical and logon parameters are used by the sender RFC adapter to get the metadata from the SAP back-end system by using the interface of the function module. These parameters can be found under the RFC Metadata Repository (MDRS) parameters.

The MDRS is accessed only once because the metadata is temporarily stored in the adapter cache and it can be reused for subsequent calls of the same function module.

The cache is communication channel-specific and is deleted as soon as the communication channel is changed and activated in the ID. Restarting the JEE Engine or the relevant RFC adapter service also deletes the cache.

Additional note about the RFC library librfc32(.dll)

The classic RFC library librfc32(.dll) will no longer be supported after March, 31, 2016. It is replaced by the new SAP NetWeaver RFC Library. Check Notes: 1025361 and 1005832. A limitation of this new RFC Library is, that it does not support communication between two external systems. For example, it is no longer possible to connect an external program with SAP Process Integration (PI) by using the PI RFC Adapter. The usage of pure RFC should be avoided by using proxies instead.

How to Create a Sender RFC Communication Channel

How to Analyze Gateway Registration

Synchronous RFC to the Sender RFC Adapter

After you have created the Remote Function Call (RFC) destination, the destination can be used for a synchronous Remote Function Call (sRFC), for example, in a report with the ABAP statement call function ... destination. After call function, enter (in upper case and quotation marks) the remote-enabled function module that you want to call.

Furthermore, use the addition destination to specify the RFC destination that addresses the RFC adapter. In the calling program, handle any standard system exceptions like system_failure for system errors and communication_failure for communication problems.

sRFC calls are handled with the Quality of Service (QoS) Best Effort (BE).

Example Program of Synchronous RFC

The example program of synchronous RFC is as follows:

Code snippet
Parameters: l_id type scustom-id default '1', 
					dest type rfcdes-rfcdest default 'XI_SERVER'.
DATA: 			l_scust type scustom, 

destination dest 
    i_id                = l_id 
  e_SCUSTOM             = l_scust 
  NO_ENTRY_FOUND        = 1 
  system_failure        = 2 message mess_text 
  communication_failure = 3 message mess_text 
  OTHERS                = 4  
case sy-subrc. 
Both system exceptions given in the example enable you to get further system information by using the addition message (and a subsequent program variable).

Before processing a request, technical routing, logical routing, and mapping must be available on Process Integration (PI).

The RFC adapter reads the system identifier and client from the RFC call and checks it against the Adapter-Specific Identifiers of the communication components in the Integration Builder to determine the sender communication component.

Transactional RFC to the Sender RFC Adapter

Work with a transactional Remote Function Call (tRFC) to make changes to a database using the remote-enabled function module.

A tRFC call is handled with the QoS Exactly Once (EO).

Note the following points about tRFC calls:

  • The Call function is used in addition to a background task.

  • It is not possible to import data or handle errors.

  • Calls must be ended with Commit Work.

Example Program of a Transactional RFC

The example program of a transactional RFC is as follows:

Code snippet
in background task 
 destination dest 
     BOOKING_DATA        = bookdat
*  AIRLINEID             = id
*  BOOKINGNUMBER         = nr
*  TICKET_PRICE          = price 
*  RETURN                = ret
  commit work.

How to Configure a Scenario for an RFC Sender Call

How to Configure a Scenario for an RFC Sender Call - Part 1

How to Configure a Scenario for an RFC Sender Call - Part 2

Log in to track your progress & complete quizzes