--------------------------------------------------------------------------------------------------
"Name of general .exe Proram that can be called from abap
"CALC/WINWORD/EXCEL/NOTEPAD/MSPAINT/WORDPAD(WRITE)/IPCONFIG/PING/ " MPLAYER2/CMD/FIND/MPLAY32
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
DOCUMENT = 'CALC' " PASS EXE program name as document
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
* 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
.
IF sy-subrc <> 0.
MESSAGE 'Some Error Occured! ' TYPE 'I'.
ENDIF.
--------------------------------------------------------------------------------------------------
No comments:
Post a Comment