With WebGL, 3D formats can be displayed interactively in the browser control and thus directly on sap screens.

In this example we will visualize the material PROD01 in 3D.

- Choose an eligible visualization library
- Embed an HTML control with this library
- Read the 3D data for a material and give it to the library as input

The result is an interactive presentation of the CAD data of the material:


First of all, the data to be visualized must be available in a suitable 3D format. We chose the STL format, a (quasi-)standard format of many CAD systems. The name of the. stl file corresponds to the material number, e. g. "prod01.stl". The file must be stored on a web server, since JavaScript is unable to access the local file system.

Then we create an HTML file, which we load later in the browser control and in which we use a library to display 3D graphics, "three.js" (see Wikipedia) to load the corresponding 3D file of a material and visualize it on the sap screen.

Finally, when you display a material with GuiXT in transaction MM03, we display the browser control and pass the material number to the script as a parameter in the URL:

GuiXT Script:

Box     (10,1)  (29,78)           "3D View (WebGL)"
V[3dURL] "http://www.synactives10.com/download/webgl/index_e.html?file="
(10.7,1.6) (26.6,70.1) progID="&V[3dURL]&F[Material]" name="webgl"

You can download all required files for this example here as a .zip file:
Browsercontrol with WebGL (approx. 0.2 MB)

WebGL is only supported by Internet Explorer from version 11!

By default an older version is used when using the IE control. However, you can specify in the GuiXT script which version should be used for the control with the following command:

  // Choose IE11

Further details can be found here:

InputAssistant + Controls