SAP CALL FUNCTION - Reference ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for CALL_FUNCTION

CALL FUNCTION

ABAP Reference
ABAP Code Snippet


ABAP Syntax CALL FUNCTION func [ {IN UPDATE TASK}

| { [ {STARTING NEW TASK task}
| {IN BACKGROUND TASK [AS SEPARATE UNIT]} ]
[DESTINATION dest] }
| {IN BACKGROUND UNIT} ]
[{CALLING meth}|{PERFORMING subr} ON END OF TASK]
{[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 ...]
[error_message = n_error]
[system_failure = ns
[MESSAGE smess]]
[communication_failure = nc
[MESSAGE cmess]]
[resource_failure = nc]
[OTHERS = n_others]]}
| {[PARAMETER-TABLE ptab]
[EXCEPTION-TABLE etab] }.
ABAP Code Snippet

What does it do? Calls the function module specified in func.

ABAP Addition IN UPDATE TASK
Registers an update function module.
DESTINATION, STARTING NEW TASK, IN BACKGROUND TASK|UNIT
Synchronous, asynchronous, background, or transactional RFC.
{CALLING meth}|{PERFORMING subr} ON END OF TASK
At the end of an asynchronous RFC, calls method meth or subroutine subr.
EXPORTING p1 = a1 p2 = a2 ...
Passes actual parameters a1, a2, ... to input parameters p1, p2, ...
IMPORTING p1 = a1 p2 = a2 ...
Inherits output parameters p1, p2, ... in actual parameters a1, a2, ...
TABLES t1 = itab1 t2 = itab2 ...
Assigns internal tables itab1, itab2, ... to table parameters t1, t2, and so on.
CHANGING p1 = a1 p2 = a2 ...
Assigns actual parameters a1, a2, ... to input/output parameters p1, p2, and so on.
EXCEPTIONS
Enables the handling of non-class-based exceptions:

exc1 = n1 exc2 = n2 ... - Assigns numbers n1, n2, ... to the classic exceptions exc1, exc2, ... for the return code sy-subrc.

error_message = n_error - Handles messages using the special exception error_message.

system_failure, communication_failure, resource_failure - Handle special classical exceptions by passing the first line of the short dump to smess or cmess.

OTHERS = n_others - Assigns a number n_others for the return code sy-subrc to all exceptions not named explicitly.
PARAMETER-TABLE ptab
Assigns dynamic actual parameters to formal parameters using an internal table ptab of the type ABAP_FUNC_PARMBIND_TAB.
EXCEPTION-TABLE etab
Assigns dynamic return codes to non-class-based exceptions using an internal table etab of the type ABAP_FUNC_EXCPBIND_TAB.


Return to menu