In this blog I will show how to launch SAP GUI from IE Browser using Javascript.

In Javascript we will use an ActiveXObject (wscript.shell) to call SAPshortcut.exe with the required parameters to open the SAP GUI.

The result should be as the following:



The javascript code is:

The SAP GUI connects to the SAP system with the following parameters:

sytem: ecc.theobald-software.com
ID: 00
Client: 800
Transaction: *XD02 RF02D-KUNNR=1000; (Change customer with the customer id 1000)

SAP Note 103019 describes the usage of SAPshortcut.exe and its parameters.

This script runs only with IE. Other browsers like Chrome, Firefox or Opera do not support ActiveXObject.
Note that running such scripts properly require to change the client’s security settings.
Enable ActiveX (Tools -> Internet Options -> Security -> Tursted sites -> Custom Level. Go through all the ActiveX setting there, select Prompt or Enable).
Add the site to the trusted zone in IE (Tools -> Internet Options -> Security -> Trusted sites -> Sites -> Add).

here you can download the whole code for the html site.

Written by Khoder Elzein

Khoder is responsible for presales and always has an attentive ear for our customers, prospectives and partners. When travelling in Germany or abroad, he provides customer support at PoCs, workshops and on training courses. He also looks after the further development of our software solutions. Khoder has been working in IT since the turn of the millennium; he has been a member of team Theobald since 2009. When it comes to private interests, family, nature and reading feature at the top of his list – along with innovative fusion cuisine, as you may infer from his favourite dish of Swabian cheese noodles with tabouleh.