2011 Sep 30 11:56 AM
Hi,
There is a requirement wherein one folder is created on presentation server ( Desktop ) in which we are putting excel files from
SAP ABAP using FM GUI_DOWNLOAD and now that folder contain file in excel forma lets say that folder name is INPUT. We have also created one more folder named OUTPUT and now the requirement is there is one executable converter file .exe in another folder lets say CONVERTER . Now the requirement is i need to execute that .exe file on excel file which it will then convert into necessary format which can be uploaded in bank site. The command works fine from windows i need to incorporate and execute the same command from SAP Kindly suggest any Function module,syntax or class n method exists for same.
The command which executed successfully from windows command prompt is
c:\>CONVERTER\ converter.exe C:\INPUT\FILE.XLS C:\OUTPUT\
The same command i need to execute it from SAP Report
Thanks
Parag
2011 Oct 02 11:08 AM
Hi Parag,
It is advisable to use OO method of invoking these commands as mentioned above CL_GUI_FRONTEND_SERVICES=>EXECUTE.
Thanks and Best Regards,
Dinesh.
Hi Parag,
It is advisable to use OO method of invoking these commands as mentioned above CL_GUI_FRONTEND_SERVICES=>EXECUTE.
Thanks and Best Regards,
Dinesh.
2011 Sep 30 12:16 PM
Hi Parag,
Most of such actions can be done with use of class CL_GUI_FRONTEND_SERVICES. In your case
CL_GUI_FRONTEND_SERVICES=>EXECUTE with use of APPLICATION parameter.
BR
Marcin Cholewczuk
2011 Sep 30 3:42 PM
Hi:
Try with this:
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = u2018C:\CONVERTER\converter.exeu2019
parameter = u2018C:\INPUT\FILE.XLS C:\OUTPUT\u2019
minimized = u2018Xu2019
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.
2011 Oct 01 4:21 PM
Dear Parag
Try the code written below. I hope this will help you.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
commandline = 'converter.exe C:\INPUT\FILE.XLS C:\OUTPUT\' "filename
program = 'c:\>CONVERTER\' "prg_location
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
gui_refuse_execute = 5
OTHERS = 6.
Regards
Ashkar Rizvi
2011 Oct 02 11:08 AM
Hi Parag,
It is advisable to use OO method of invoking these commands as mentioned above CL_GUI_FRONTEND_SERVICES=>EXECUTE.
Thanks and Best Regards,
Dinesh.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |