Donnerstag, 16. August 2012

How to open SAP GUI from browser


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.

1 Kommentar: