ABAP - Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  Internal Statement for System Function Call → 

CALL - System Function Call

This statement is for internal use only.
It must not be used in application programs.


Syntax

CALL cfunc.

Addition:

... ID id1 FIELD f1 ... ID idn FIELD fn

Effect

Calls the system function cfunc. A flat character-like data object containing the name of the function can be specified for cfunc. The function must be entered in the file sapactab.h. Modifying a function or creating a new function requires the ABAP kernel to be compiled again and linked. This requires the C source code files.

System Fields

The CALL statement itself does not set any system fields. Whether system fields such as sy-subrc are set depends on the system function called.

Notes

Security Note

Calls of system functions whose names or parameters are injected into the program from outside present a serious security risk. The values from outside must be checked thoroughly before being used. See System Command Injections.

Addition

... ID id1 FIELD f1 ... ID idn FIELD fn

Effect

Passes fields to the called program using pass by reference. ID id1 is used to specify the name of a formal parameter and FIELD f1 is used to specify the associated field from the ABAP program. If a formal parameter expects an internal table, the latter is passed in the form FIELD tab[].

Example

Query of the current database server.

DATA dbserver TYPE c LENGTH 255.
CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'SAPDBHOST'
                   ID 'VALUE' FIELD  dbserver.

Exceptions

Non-Handleable Exceptions