Purpose With WebView you can embed a web page into a SAP GUI window.   

Please note: The instruction connectHTML offers a number of possibilities for dynamic interaction with the displayed web page, e.g. read values, set values, trigger push buttons.

Example WebView (10.5,40.2) (20.5,80) "https://bing.com" name="bing"

The web page "bing.com" is displayed in the screen. If the V[bing] script variable already contains a reference to a valid WebView, it will be displayed. Otherwise, a new WebView is created and the reference to it is returned in the V[bing] script variable.

Format WebView (row1,column1) (row2,column2) "URL"  name="myName"

You specify with (row1,column1) (row2,column2) the top left corner and the bottom right corner. You can, if necessary, use numbers with decimals for the coordinates. You can also use the wysiwyg mode of Script Editor Pro for this purpose.

Possible URLs are:

  • Intranet or Internet URLs with http:// or https://
  • Local files with an absolute path e.g. "C:/instructions/overview.html" or a relative path e.g. "instructions/overview.html". In the case of relative paths, the file is searched for in the current script directories according to the same rules as e.g. "for "Image" or "Include". Files from the SAP MIME Repository "SAPMR:..." are also possible.
  • PDF files are displayed embedded.
  • The URL "about:blank" starts with an empty area in which you can display your own HTML by e.g. connectHTML setHTMLFromText=...
Additional options
-closeOnHide The WebView is closed when it is no longer displayed. Otherwise it remains active and is displayed again in the respective state within an SAP GUI mode.
-invisible The control is created but is not visible. It can be made visible by connectHTML visible="on". You can also use an invisible WebView to read information that is then displayed using GuiXT means.
-floating A new window is opened for display. It can be resized and moved about independently of the SAP GUI screen.
-maximize The window is maximized. Often used in conjunction with -floating.
-topMost Used in conjunction with -floating: the window is shown on top of all other windows
-transparent The WebView is displayed with a transparent background color. The transparent display is only effective if "transparent" has been set as the background color in HTML, because the default value of HTML pages is a white background.
title= Used in conjunction with -floating: window title
iconFile= Used in conjunction with -floating: Name of an .ico file. The icon is displayed in the WebView window.
initFlag= Name of a GuiXT variable. The variable is set to "X" by GuiXT if the control has been newly created, otherwise it is set to "". You can query the variable after WebView in order to call an initialization function in VB.NET or VBScript. 
zoomFactor= Specification of a zoom factor, for example zoomFactor="1.5"
-noUserZoom Deactivates the possibility for the user to zoom himself with Ctrl+scroll
returnWindow= Name of a variable that revceives the internal window handle of the created webview window
Compatibility and technology The WebView display is compatible with Google Chrome, Microsoft Edge, Opera, Samsung Internet and other browsers that internally use the open source "Chromium" to display web pages and run JavaScript. GuiXT uses the Microsoft WebView2 control, which is based on Chromium. If you use special Internet Explorer techniques in the HTML page, such as embedding ActiveX elements, you can use the Control statement instead.
Components GuiXT + Controls