Get Example source ABAP code based on a different SAP table
ID CALL-FUNCTION • CALL FUNCTION ABAP Statement
CALL FUNCTION> Short Reference >
ABAP_SYNTAX_FORMS
General Function Module Call> 1 CALL FUNCTION func ${ parameter_list>> $| parameter_tables> $}.>
Registration of an Update Task FunctionModule> BEGIN_SECTION ID CALL-FUNCTION-UPDATE-TASK 2 CALL FUNCTION update_function IN UPDATE TASK> $[EXPORTING p1 = a1 p2 = a2 ...$]> $[TABLES t1 = itab1 t2 = itab2 ...$].> END_SECTION ID CALL-FUNCTION-UPDATE-TASK BEGIN_SECTION VERSION 5 OUT
Remote Function Call> BEGIN_SECTION ID CALL-FUNCTION-RFC 3 CALL FUNCTION ... DESTINATION ...> END_SECTION ID CALL-FUNCTION-RFC END_SECTION VERSION 5 OUT
What does it do? Call or registering of a function module. Static and dynamic function module calls have no syntactic differences. The function module is always specified by a data object and the name of the called function module not determined until runtime. System Fields> The system field sy-subrc> is set to 0 when a function module is called. If a non-class-based exception> is raised and is handled by the assignment of a value, sy-subrc> is set to this value. After the registration of an update function module using CALL FUNCTION ... IN UPDATE TASK>, sy-subrc> is undefined.
Latest notes:
Unlike in method calls, there are no different syntax variants for static calls and dynamic calls of function modules. They can, however, be distinguished as follows
In a dynamic function module call, the name of the function module is specified in a variable and the parameter is passed dynamically. This is possible in general function module calls. In both cases, incorrectly specified function modules or parameters produce runtime errors and not syntax errors
CALL CUSTOMER-FUNCTION>> is another variant for calling obsolete function module exits.
In static function module calls, a statically known function module is specified as a character literal> or as a constant and the parameter is passed statically. NON_V5_HINTS
These static specifications are evaluated by tools such as the Extended Program Check> or the where-used list. ABAP_HINT_END