Purpose
Embed HTML files from SAP Mime Repository or SAP Web Repository

For easy rollout to numerous users, central files are much better to handle than local copies on each PC.

Solution

  • Import all files needed (HTML, CSS, images, ...) into the SAP MIME Repository, preserving the folder structure
  • Embed the HTML page into the SAP GUI window with "Control" using the notation

    Control (row,col) progid="file://SAPMR:... "  name="..."
  • For all files needed within the HTM (e.g. CSS or images) execute

    CacheFile "SAPMR:... "

    in order to assure that the file is downloaded from SAP Mime Repository to the local GuiXT cache and can be used by the browser.

The "SAP Web Repository" does not support subfolders. You still can use the  CacheFile-approach described here, but you have to put all files needed for the HTML display into the same folder as the HTML file.

Example

We import two files into SAP Mime Repository:

- IW21.PC.HTML
- IMAGES/IW21.PC.HTML

The image file is needed by the HTML file:
<
body style='background-image:url(images/iw21.pc.png); ...

In the GuiXT script, we use CacheFile for the image file before we execute the Control statement:

// load backgound image into GuiXT cache
CacheFile "SAPMR:SAP/PUBLIC/GUIXT/IW21/IMAGES/IW21.PC.PNG"

// embed HTML file
Control (0.7,0.8) (28.9,155.4) _
  
progid="file://SAPMR:SAP/PUBLIC/GUIXT/IW21/IW21.PC.HTML" _
  
name="control.pc"

The HTLM page is now displayed with the background image:


When we look at the local GuiXT cache folder, we see that the folder structure of the SAP Mime Repository is preserved in the cache:



Here "sapmr" stands for "SAP Mime Repository", "S4h" is the SAP system name, "GuiXT Scripts Version 2018" comes from the statement

VersionNumber "2018"

in the GuiXT session script (performance optimization), and the rest of the folder structure reflects the SAP Mime Repository folder structure.

Components
InputAssistant + Controls