Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ABAP and Operating System Statements 

Operating System Statements of the Presentation Server

The method EXECUTE of the class CL_GUI_FRONTEND_SERVICES can be used to call operating system statements of the presentation server. To make this possible, however, the current ABAP program must be executed in dialog and from SAP GUI.

Other versions: 7.31 | 7.40 | 7.54


Note

The method EXECUTE of the class CL_GUI_FRONTEND_SERVICES replaces the obsolete function module WS_EXECUTE.


Example

Calls the command line window in MS Windows.

cl_gui_frontend_services=>execute( 
   EXPORTING 
     application           = 'cmd.exe' 
    default_directory      = 'C:\' 
  EXCEPTIONS 
    cntl_error = 1 
    error_no_gui           = 2 
    bad_parameter          = 3 
    file_not_found   = 4 
    path_not_found         = 5 
    file_extension_unknown = 6 
    error_execute_failed   = 7 
    synchronous_failed     = 8 
    not_supported_by_gui   = 9 
    OTHERS = 10 ). 
IF sy-subrc <> 0. 
  ... 
ENDIF.