Академический Документы
Профессиональный Документы
Культура Документы
What is RFC?
A Remote Function Call(RFC) is a call to a function module running in a system different from
the caller's. The remote function can also be called from within the same system (as a remote
call).The RFC interface provides the ability to call remote functions.
RFC consists of two interfaces :
1. A calling interface for ABAP Programs
2. A calling interface for Non-SAP programs.
Any ABAP program can call a remote function using the CALL FUNCTION...DESTINATION
statement. The DESTINATION parameter tells the SAP System that the called function runs in
a system other than the caller's.
Syntax?
1
2
3
4
5
6
7
8
9
10
11
Logical Destinations are defined via transaction SM59 and stored in Table RFCDES
Functions of the RFC interface
Converting all parameter data to the representation needed in the remote system
Types of RFC
1. Synchronous RFC - The calling program continues the execution only after the called
function is complete.
2. Asynchronous RFC - The calling program continues the execution without waiting for
return from the called function.
3. Transactional RFC - The called function module is executed exactly once in the RFC
target system.Each function call is seen as a transaction in the target system.
Transactional RFCs use the suffix IN BACKGROUND TASK . Eg : CALL FUNCTION
'remotefunction' IN BACKGROUND TASK
3.Define the destination of the RFC server in the RFC client system that calls the remote
function ( via SM59 transaction).
4.Declaring Parameters: All parameter fields for a remote function module must be defined as
reference fields, that is, like ABAP Dictionary fields.
5.Exceptions: The system raises COMMUNICATION_FAILURE and SYSTEM_FAILURE
internally. You can raise exceptions in a remote function just as you would in a locally called
function.
However, when testing ABAP-to-ABAP RFC calls, you can use the ABAP debugger to
monitor the execution of the RFC function in the remote system.
With remote calls, the ABAP debugger (including the debugging interface) runs on the
local system. Data values and other run information for the remote function are passed in
from the remote system.