*&---------------------------------------------------------------------*
*& Report ZEXECUTE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ZEXECUTE.
*实例1,abap调用java文件
data para type string.
parameter mytext type objectname.
parameter mytext1 type objectname.
para = 'Test'. "class name
concatenate para mytext mytext1 into para separated by space.
call method cl_gui_frontend_services=>execute
exporting
application = 'JAVA' "需要执行的语言
parameter = para "参数
default_directory = 'D:/' "路径
minimized = 'X'
synchronous = 'WAIT'
operation = 'OPEN'
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.
*
*
write 'Success'.
*实例:2
************************************************************************
*--调用web网页
*--------执行成功
*data: GD_WEBADDR type STRING.
*parameter WEB type OBJECTNAME.
*
*GD_WEBADDR = WEB.
*
*call method CL_GUI_FRONTEND_SERVICES=>EXECUTE
* exporting
* DOCUMENT = GD_WEBADDR
* exceptions
* others = 1.