‎2009 Sep 08 2:28 PM
Hello all,
Now I'm trying to start up Internet Explorer in ABAP through HTML GUI.
I could start IE in ABAP using OLE through Windows GUI, but couldn't do in HTML GUI.
Therefore, I'm now searching for another solution to execute Internet Explorer in ABAP.
For example, I found "IF_WD_WINDOW_MANAGER=>CREATE_EXTERNAL_WINDOW" but don't know how to use this.
Please tell me your idea to start up IE in ABAP through HTML GUI.
Or please tell me how to use the method "IF_WD_WINDOW_MANAGER=>CREATE_EXTERNAL_WINDOW" in ABAP Report program.
thanks in advance,
Hozy
‎2009 Sep 09 12:48 AM
Hi all,
I'm also wondering if I can use "HTMLCNTL_SHOW_URL_IN_BROWSER" in report program and also in HTML GUI.
However, I don't know how to use this function module.
I could start IE, but failed to give URL to the browser, and in HTMLGUI, couldn't even start IE.
My sourcecode for this module is below;
-
DATA: VL_URL TYPE C
.
VL_URL = 'http://www.yahoo.com'.
CALL FUNCTION 'HTMLCNTL_CREATE'
EXPORTING
OWNER_REPID = SY-REPID
PARENTID = ''
LINK_REPID = SY-REPID
DYNNR = SY-DYNNR
CONTAINER = ''
SHELLSTYLE = ''
CHANGING
HANDLE = VL_CNTL_HANDLE
EXCEPTIONS
CONTROL_INSTALL_ERROR = 1
CREATE_ERROR = 2
OTHERS = 3
.
CALL FUNCTION 'HTMLCNTL_SHOW_URL_IN_BROWSER'
EXPORTING
H_CONTROL = VL_CNTL_HANDLE
URL = VL_URL
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
CONTROL_NOT_INITIALIZED = 3
CALL_METHOD_ERROR = 4
OTHERS = 4
.
-
thanks and regards,
Hozy
‎2009 Sep 09 1:01 AM
How about just using the EXECUTE method of class CL_GUI_FRONTEND_SERVICES? Don't know if that'd work from the HTML GUI, but it may be worth a shot.
When I ran this in test mode, I was able to start Internet Explorer with "operation" OPEN, "application" iexplore and in "parameter" I could pass the URL I wanted IE to open.
‎2009 Sep 09 6:27 AM
Hi,
Thanks a lot for your suggestion.
I couldn't directly open IE by using EXECUTE method in HTMLGUI, but I tried the followings and nearly made it.
#1 Create Internal Table containing VBScript codings
#2 Use GUI_DOWNLOAD to tranfer the script to local PC
#3 Use CL_GUI_FRONTEND_SERVICES=>EXECUTE to open IE by executing cscript + vbs
Sample sourcecode is as follows;
-
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = 'C:\script\testscript.vbs'
IMPORTING
FILELENGTH = VL_FILELENGTH
CHANGING
DATA_TAB = TL_DATA_TAB "VBScript
.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
APPLICATION = 'CSCRIPT.EXE'
PARAMETER = 'C:\script\testscript.vbs http://www.yahoo.com' "Set URL as 2nd parameter
OPERATION = 'OPEN'
.
-
When you execute this in WindowsGUI, you can open YAHOO.
But when in HTMLGUI, you cannot.
You can download VBScript, but fail to EXECUTE cscript command.
The JAVA error message "cannot execute the program" comes up and cannot open IE.
Would you please give me any advice on how to use CL_GUI_FRONTEND_SERVICES=>EXECUTE ?
And if you have any suggestion on JAVA Error, please help me.
thanks in advance,
Hozy
‎2009 Sep 09 5:18 AM
Hi Hozy,
Have u checked report RSDEMO_HTML_VIEWER.
Thanks,
Edited by: Sap Fan on Sep 9, 2009 6:18 AM