Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Exec. InternetExplorer by ABAP through HTML GUI

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

0 Kudos

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

awin_prabhu
Active Contributor
0 Kudos

Hi Hozy,

Have u checked report RSDEMO_HTML_VIEWER.

Thanks,

Edited by: Sap Fan on Sep 9, 2009 6:18 AM