05-09-2006 12:00 PM - last edited on 02-04-2024 6:08 AM by postmig_api_4
Hi,
I am working on the Automatic payment transaction(f110).
while using this transaction i have to call the eft.bat file so that it can encrypt the file so that we can send this file to bank. issue is the place where im calling the eft.bat file is running in the background and when eftbat is being called it runs in the foreground .so in this case it throws the dump.
please any body can suggest how should i call any program
while running in the background and called third party program should also run in the background.
regards,
Ronie
05-09-2006 12:15 PM
Hai Ronie
WS_EXECUTE was Absolote in Higher versions
Try with the following Class & Methods
DATA: L_APP TYPE STRING.
L_APP = i_file.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT =
APPLICATION = L_APP
PARAMETER = 'c:\temp\lgsmain'
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks & regards
Sreenivasulu P
Message was edited by: Sreenivasulu Ponnadi
05-09-2006 12:03 PM
Hi,
Try calling the method EXECUTE of the class CL_GUI_FRONTEND_SERVICES to execute the file. Or the function module WS_EXECUTE.
Regards
Ravi
Note : Please mark the helpful answers
05-09-2006 12:07 PM
Hi,
try to call the FM <b>WS_EXECUTE</b>
Regards
vijay
05-09-2006 12:20 PM
Hi,
I have used all these but situation remains the same.
CALL METHOD cl_gui_frontend_services=>execute
GUI_EXEC Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
GUI_RUN Start a File or Program Asynchronously with ShellExecute
WS_EXECUTE execute a program on a windows PC
regards,
Ronie
05-09-2006 12:23 PM
hi ,
i am using this!!
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
DOCUMENT =
APPLICATION = 'c:\eft\startup.bat'
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards,
Ronie
05-09-2006 12:29 PM
Hi Ronie,
if you are running the Program in BACKGROUND none of them will work. since all of them will use Frontend. in BAckground it is not possible.
Regards
vijay
05-09-2006 12:15 PM
Hai Ronie
WS_EXECUTE was Absolote in Higher versions
Try with the following Class & Methods
DATA: L_APP TYPE STRING.
L_APP = i_file.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT =
APPLICATION = L_APP
PARAMETER = 'c:\temp\lgsmain'
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks & regards
Sreenivasulu P
Message was edited by: Sreenivasulu Ponnadi
05-09-2006 12:26 PM
This is an example to open pdf file
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
* DOCUMENT =
APPLICATION = 'AcroRd32.exe'
PARAMETER = 'C:MY_FILE.PDF'
* 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.
ENDIF.
05-09-2006 12:31 PM
hi ronie,
you cannot use the method CL_GUI_FRONTEND_SERVICES=>EXECUTE for calling an object in the background...
Cheers,
Abdul
05-09-2006 12:42 PM
hi,
so what should i do to do this any work around for this.
this is really urgent!!!
regards,
Ronie.
05-09-2006 12:50 PM
Try creating a OS command in SM69 for the batch file and execute that command using the function SXPG_COMMAND_EXECUTE. I think this will execute in background as well.
Regards,
Ravi
05-11-2006 2:21 PM
You can create an external job with transaction SM36. I have run a Unix shell script with this method.
05-12-2006 6:44 AM
The print programs in F110 run in the background. There is no way to call an exe on the frontend from a background job.
There are two options here:
1. Run the print program manually (ie create a transaction or from SA38). It will then run in the foreground and GUI_EXECUTE will work.
2. Run the encryption program on the application server.
Solution 2 is better, as running an encryption on the workstation is not good security.
Michael