‎2006 Nov 17 1:17 PM
Hi,
I have a PDF to TXT third party executable file in the application server, I need to call this exe thru my program.
My requirement is to call this exe file and open a PDF file and convert the
PDF to TXT and write the output TXT file into application servier.
is it possible thru ABAP?
Thanks
aRs
‎2006 Nov 17 2:10 PM
Hi
You can use the class <b>cl_gui_frontend_services</b>
Please see the following command
appl = 'cmd'.
param = '/c ipconfig /all>c:\temp\ipconfig.txt'.
call method cl_gui_frontend_services=>execute
exporting
DOCUMENT = appl
application = appl
parameter = param
DEFAULT_DIRECTORY =
MAXIMIZED =
MINIMIZED =
synchronous = 'X'
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
.
‎2006 Nov 17 1:20 PM
Assuming you can pass the executable the source and target filenames as parameters, it's pretty easy. Define an external command in SM69 that calls the executable and then call that from your code using one of the function modules in function group SXPT (eg SXPG_COMMAND_EXECUTE).
MJ
‎2006 Nov 17 1:23 PM
Hi ars,
1. we can use GUI_EXEC
2. in that we can give the full path of the .EXE file.
regards,
amit m.
‎2006 Nov 17 1:24 PM
You call other applications through the EXECUTE method of CL_GUI_FRONTEND_SERVICES for this task, but not sure how far this can do the rest of your requirements.
Regards
Kathirvel
‎2006 Nov 17 1:24 PM
To execute an exe file you can use the class=> method:
CL_GUI_FRONTEND_SERVICES=>EXECUTE
or you can define an external od command as other have already mentioed.
http://help.sap.com/saphelp_erp2005/helpdata/en/c4/3a8023505211d189550000e829fbbd/frameset.htm
Regards,
Ravi
‎2006 Nov 17 2:10 PM
Hi
You can use the class <b>cl_gui_frontend_services</b>
Please see the following command
appl = 'cmd'.
param = '/c ipconfig /all>c:\temp\ipconfig.txt'.
call method cl_gui_frontend_services=>execute
exporting
DOCUMENT = appl
application = appl
parameter = param
DEFAULT_DIRECTORY =
MAXIMIZED =
MINIMIZED =
synchronous = 'X'
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
.