Calling [.EXE] program from ABAP Code


 


“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.


 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s