Warning: Undefined variable $saptab in /customers/b/9/9/trailsap.com/httpd.www/abap-statements/index.php on line 46
Get Example source ABAP code based on a different SAP table
Warning: Undefined variable $prev in /customers/b/9/9/trailsap.com/httpd.www/abap-statements/index.php on line 62
Standard SAP Help for CALL_SYSTEM_FUNCTION
CALL - System Function Call ABAP Code Snippet • CALL cfunc ABAP_STATEMENT_INT
ABAP_BASIC_FORM_8 CALL cfunc. • FIELD CALL cfunc • ID CALL cfunc
ABAP Addition ... ID id1 FIELD f1 ... ID idn FIELD fn
What does it do? 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.
Latest notes:If possible, use kernel methods instead of system functions. External programs should be called using the RFC mechanism: CALL FUNCTION... DESTINATION . With some critical C functions, the system performs an authorization check automatically. If the user does not have the appropriate authorization, a runtime error occurs. The authorization can be checked using the function module AUTHORITY_CHECK_C_FUNCTION. The use of the system function SYSTEM, which can be used to execute operating system statements, is not recommended and can be deactivated using the profile parameter rdisp/call_system. If called, it the function then raises a non-handleable exception. Specifying a system function dynamically is one of the dynamic programming techniques. ABAP Code Snippet
Security Note
ABAP Code Snippet If used wrongly, dynamic calls of program units can present a serious security risk. Names of program units that are passed to a program from the outside must be checked thoroughly before being used in dynamic calls. The system class CL_ABAP_DYN_PRG , for example, can be used to do this. ABAP Code Snippet ABAP Code Snippet See System Command Injections .
ABAP Addition
What does it do? Passes fields to the called program using pass by reference. ID id1 is used to specify the name of a formal parameter; 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 ABAP Coding DATA RESULT(8). CALL 'MULTIPLY' ID 'P1' FIELD '9999' ID 'P2' FIELD '9999' ID 'RES' FIELD RESULT.