Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

ABAP - Host Command

$
0
0

Run Host Command from ABAP code.

 

REPORT hostcommand.

 

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECTION-SCREEN PUSHBUTTON /10(10) bt_calc USER-COMMAND calc.

SELECTION-SCREEN PUSHBUTTON /10(10) bt_word USER-COMMAND word.

SELECTION-SCREEN END OF BLOCK b1.

 

INITIALIZATION.

   MOVE 'Calculator' TO bt_calc.

   MOVE 'MS Word' TO  bt_word.

 

START-OF-SELECTION.

 

END-OF-SELECTION.

 

AT SELECTION-SCREEN.

   CASE sy-ucomm.

      " Calculator

     WHEN 'CALC'.

       CALL FUNCTION 'GUI_RUN'

         EXPORTING

           command = 'CALC.EXE'.

 

       " MS Word

     WHEN 'WORD'.

       CALL FUNCTION 'GUI_RUN'

         EXPORTING

           command = 'winword.EXE'.

 

   ENDCASE.


W1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W2.jpg


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>