Hi Experts,
I need to launch or terminate an external application (i.e. command prompt, notepad, etc.) in background job by using FM SXPG_COMMAND_EXECUTE. However, I am unable to proceed because of the following error occured after executing the command in SM69.
Can't exec external program (No such file or directory)
External program terminated with exit code 1
I was using the following sample code. Can someone tell me what might be the cause of the problem?
DATA: lv_status TYPE extcmdexex-status,
lt_output TYPE TABLE OF btcxpm,
lv_opsys TYPE sy-opsys.
lv_opsys = 'WINDOWS NT'.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZIEXPLORE'
additional_parameters = '/c'
operatingsystem = lv_opsys
IMPORTING
status = lv_status
TABLES
exec_protocol = lt_output
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
ZIEXPLORE command
Operating system command: cmd
Parameters for operating system command: taskkill /f /im iexplore.exe
Thanks and Regards,
Louie