ABAP - Keyword Documentation →  ABAP - Programming Language →  Data Interfaces and Communication Interfaces →  Remote Function Call (RFC) →  RFC - CALL FUNCTION →  CALL FUNCTION DESTINATION → 
Mail Feedback

CALL FUNCTION DESTINATION, parameter_list

Short Reference

Syntax

... { [EXPORTING  p1 = a1 p2 = a2 ...]
      [IMPORTING  p1 = a1 p2 = a2 ...]
      [TABLES     t1 = itab1 t2 = itab2 ...]
      [CHANGING   p1 = a1 p2 = a2 ...]
      [EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
                  [system_failure        = ns [MESSAGE smess]]
                  [communication_failure = nc [MESSAGE cmess]]
                  [OTHERS = n_others]] }
  | { [PARAMETER-TABLE ptab]
      [EXCEPTION-TABLE etab] } ...

Additions:

1. EXPORTING  p1 = a1 p2 = a2 ...

2. IMPORTING  p1 = a1 p2 = a2 ...

3. TABLES     t1 = itab1 t2 = itab2 ...

4. CHANGING   p1 = a1 p2 = a2 ...

5. EXCEPTIONS exc1 = n1 exc2 = n2 ... [MESSAGE ...]

6. PARAMETER-TABLE ptab

7. EXCEPTION-TABLE etab

Effect

Parameter passing for sRFC. These additions are used to assign actual parameters to the formal parameters of the synchronously called remote function module and return values to non-class-based exceptions. These additions essentially have the same meaning as they do in general function module calls.

In the case of RFC, however, the following differences to general function module calls apply:

Some other differences for specific additions are described in the following.

Hints



Addition 1  

EXPORTING  p1 = a1 p2 = a2 ...

Addition 2  

IMPORTING  p1 = a1 p2 = a2 ...

Effect

The following differences apply to the additions EXPORTING and IMPORTING:



Addition 3  

TABLES  t1 = itab1 t2 = itab2 ...

Effect

When using TABLES to pass data to table parameters, the difference is that only tables with flat line types and no secondary table key can be passed and any existing header lines are not passed.

Hints



Addition 4  

CHANGING   p1 = a1 p2 = a2 ...

Effect

With respect to the addition CHANGING, the same differences apply as to the additions EXPORTING and IMPORTING.

Addition 5  

EXCEPTIONS exc1 = n1 exc2 = n2 ... [MESSAGE ...]

Effect

The addition EXCEPTIONS is used to perform classic non-class-based exception handling, which works in essentially the same way as in general function module calls. In addition, however, the special exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE can be specified here to handle the exceptions raised by the RFC interface itself.

An optional MESSAGE addition can also be specified after these exceptions. If one of the special classic exceptions system_failure or communication_failure is raised, the first line of the associated short dump is placed in the smess or cmess field. This field must be flat and character-like.

If a remotely called function module raises a class-based exception during non-class-based exception handling, this exception is not transported and raises the predefined classic exception SYSTEM_FAILURE instead

Hints

Executable Examples



Addition 6  

PARAMETER-TABLE ptab

Addition 7  

EXCEPTION-TABLE etab

Effect

These additions use the special internal tables ptab and etab to assign actual parameters to the formal parameters of the function module and return values to the non-class-based exceptions dynamically.

The description and usage of the internal tables is the same as for the general call of function modules, but the RFC-specific rules apply that are described above for static parameter passing.

Furthermore, the column message with type REF TO data of exception table etab can be used as pointer to a character-like field for the special exceptions system_failure or communication_failure. If such an exception occurs, the character like field is filled with the same content as smess or cmess specified behind MESSAGE in static parameter passing.

Hints

Executable Example

RFC - Dynamic Parameter Passing in sRFC