2014 Jun 26 4:54 PM
Hi,
I'm using gui_run function alternatively to gui_exec and CL_GUI_FRONTEND_SERVICES=>EXECUTE and testing with this easy sentence:
CALL FUNCTION ’GUI_RUN’
EXPORTING
COMMAND = ’CALC.EXE’.
But this sentence returns the following error: "gui_run field unknown"
Any suggestion is welcome.
Thanks a lot.
2014 Jun 26 7:29 PM
Hey David,
If you refer the FM documentation for 'GUI_RUN', it clearly explains that you need to pass the file path.
So, update your code to:
CALL FUNCTION ’GUI_RUN’
EXPORTING
COMMAND = ’%WINDIR%\SYSTEM32\CALC.EXE’.
There is another way of passing the file path via parameter field. Refer the FM Documentation.
Also, the FM works for 32 bit systems only.
Regards,
Pranav.
2014 Jun 26 7:28 PM
Hi David!
You can execute like this:
CL_GUI_FRONTEND_SERVICES=>EXECUTE( APPLICATION = 'CALC.EXE') .
Regards.
2014 Jun 27 11:49 AM
Thanks Raphael,
it's clear, the only problem is that CL_GUI_FRONTEND_SERVICES=>EXECUTE does not return a returncode and I need it.
Regards.
2014 Jun 27 12:36 PM
David...
Which type of return code you mean?! Error, Sucess?!
If you read the documentation of CL_GUI_FRONTEND_SERVICES (Execute Method), you will see that have exceptions, like images below:
2014 Jun 27 4:10 PM
I want to run a bat file and would like to control whether it works fine or not.
The bat file may fail for various reasaon and I'm only interested when it fails.
Is it possible to control when it fails?
2014 Jun 28 12:34 AM
Hi David,
What this bat runs?! Is a OS routine? Can you explane more ?!
Good weekend for you.
2014 Jun 30 9:27 AM
Hi Raphael,
the bat runs a third party software, which requires as parameters the connection to Oracle and a txt file which contents the parameters the third party needs:
mysoftware.exe /Lorauser/orapwd/oraconnection /Fparamfile.txt /silent
third-party oracle connection
(user, password, defined connec) parameters file
Thanks.
2014 Jun 26 7:29 PM
Hey David,
If you refer the FM documentation for 'GUI_RUN', it clearly explains that you need to pass the file path.
So, update your code to:
CALL FUNCTION ’GUI_RUN’
EXPORTING
COMMAND = ’%WINDIR%\SYSTEM32\CALC.EXE’.
There is another way of passing the file path via parameter field. Refer the FM Documentation.
Also, the FM works for 32 bit systems only.
Regards,
Pranav.
2014 Jun 26 7:40 PM
2014 Jun 27 11:50 AM
2014 Jun 30 9:28 AM