The purpose of this report is to run MS office and other utility *.EXE file using ABAP program or report.
We will see how to find the *.EXE program in WINDOWS XP.
- Go to the C: drive check the *.EXE file you would like to run.
In this as shown below:
Similarly check for EXCEL, PICTURE manager etc.
- Go the transaction SE38 and create a executable report.
- We have created a program with push button to execute MS office program and other *.EXE programs.
- Please find the code below:
---------------------------------------------------------------------* *& Report ZOFFICE_COCKPIT *& *&---------------------------------------------------------------------* *&Name :http://sapmatrix.blogspot.in/ *& *&---------------------------------------------------------------------* REPORT ZCOCKPIT. SELECTION-SCREEN :begin of BLOCK M1 with FRAME TITLE text-001. SELECTION-SCREEN PUSHBUTTON /15(20) text-002 USER-COMMAND word."Word SELECTION-SCREEN PUSHBUTTON /15(20) text-003 USER-COMMAND excel."Excel SELECTION-SCREEN PUSHBUTTON /15(20) text-004 USER-COMMAND power."Power Point SELECTION-SCREEN PUSHBUTTON /15(20) text-005 USER-COMMAND outl."Outlook SELECTION-SCREEN PUSHBUTTON /15(20) text-006 USER-COMMAND pict."Picture manager SELECTION-SCREEN PUSHBUTTON /15(20) text-007 USER-COMMAND script."MS script editor SELECTION-SCREEN:END OF BLOCK M1. AT SELECTION-SCREEN. data :l_ucomm TYPE sy-ucomm. l_ucomm = sy-ucomm. CASE l_ucomm. WHEN 'WORD'. CALL FUNCTION 'GUI_RUN' EXPORTING command = 'C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE' . WHEN 'EXCEL'. CALL FUNCTION 'GUI_RUN' EXPORTING command = 'C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE' . WHEN 'POWER'. CALL FUNCTION 'GUI_RUN' EXPORTING command = 'C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE' . . WHEN 'OUTL'. CALL FUNCTION 'GUI_RUN' EXPORTING command= 'C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE' . WHEN 'PICT'. CALL FUNCTION 'GUI_RUN' EXPORTING command = 'C:\Program Files\Microsoft Office\OFFICE11\OIS.EXE'"PICTURE MANAGER . WHEN 'SCRIPT'. CALL FUNCTION 'GUI_RUN' EXPORTING command = 'C:\Program Files\Microsoft Office\OFFICE11\MSE7.EXE'" MS Script . WHEN OTHERS. ENDCASE.
- now Execute the Program.
-
Now click the mouse on MS POWERPOINTThis will open a power point all other *.EXE also works in the same way.
No comments:
Post a Comment