Open SAP GUI from HTML out of your webbrowser

SAP aus Browser aufrufenSome time ago I got into a discussion about whether it is possible to open transactions in the SAP GUI out of the browser. The opinion of the colleagues was unanimous – start SAP GUI from browser is something not be done.

However I have maintained and created a small proof-of-concept. Because it works. Ok, it’s not pretty, but it works. And that’s how to call the SAP GUI from the browser.

sapshcut.exe and what you can do with it

The solution works (among other things) using the sapshcut.exe (short for SAP Shortcut). This .exe file allows to start the SAP GUI parameterized. The possible parameters ranging from user via logon language up to the executed transaction. A complete list of possible parameters can be obtained by calling the sapshcut.exe with the parameter -?. (See screenshots below.)

sapshcut.exe - help from cmd  sapshcut.exe - Command list

To allow a jump from a Web browser into SAP GUI, only the sapshcut.exe with the appropriate parameters must be called. And that is also the reason, why I wrote in the introduction that it is not a nice solution. To run .exe files from the browser, there is only one, fairly “standardized” solution: ActiveX. And it works again – for security reasons – in almost no browser except Internet Explorer. (How could it be otherwise…)

Open SAP from the Internet Explorer

To execute the jump from a Web page into the SAP GUI the following, four-line Javascript function, which can be installed within any web page, is enough.

function openSAPGui(sid, client, user, password, transaction){
    var shell = new ActiveXObject("WScript.Shell");
    shell.run('sapshcut.exe -system="'+sid+'" -client='+client+' -user="'+user+'" -pw="'+password+'" -language=DE -Command="'+transaction+'"');

Theoretically you can even further summarize the whole code, in practice and in terms of reusability you shouldn’t, because the encapsulation within a small javascript function makes sense.

If you do not want to build a test page to include and run the javascript function now, just simply copy the following code, paste it into a text file, save it as [filename] .html and open it in Internet Explorer.

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>


<input id="transaktion" type="text"></input>
<input id="usr" type="text"></input>
<input id="pass" type="password"></input>
<input id="sid" type="text"></input>
<input id="mand" type="text"></input>

	<button id="go" type="button">Absprung!</button>

			var trans = $('#transaktion').val();
			var usr = $('#usr').val();
			var pass = $('#pass').val();
			var sid = $('#sid').val();
			var mand = $('#mand').val();
			openSAPGui(sid, mand, usr, pass, trans);			
	function openSAPGui(sid, client, user, password, transaction){
		var shell =  new ActiveXObject("WScript.Shell");
		shell.run('sapshcut.exe -system="'+sid+'" -client='+client+' -user="'+user+'" -pw="'+password+'" -language=DE -Command="'+transaction+'"');			

Should you know a more elegant or even cross-browser compatible solution, just tell me! I look forward to your comments and suggestions.


How to make remote IPs available on OS X’ PPTP VPN connections

OSX VPN RoutingLet me describe the initial situation: I connect my Macbook via PPTP VPN with an remote network using the standard OSX VPN client. While the VPN connection is established, however, there is the following problem.

All devices on the remote network get IP addresses within the range assigned. However, the local IP range on the external network is A server, which (as local user of the remote network) can be reached via for example, now (via VPN connection) has the IP Unfortunately it is not clear which server got what IP from the block of adresses.

Add routing rule for PPTP VPN connection on OSX

The solution is quite simple in this case. The only condition so that subsequent workaround will be successful is that the IP range in which the Macbook is, is an other than the local range of the external network. If the Macbook is therefore also in a network, subsequent solution may not work properly.

To make the remote computers available under their well-known IPs, a new routing rule (=route) must be added. This can be done via the terminal of OSX system.
With the command

ifconfig -a

you can show all network interface. In the output of the ifconfig command you should find the VPN interface’ name. (Therefore the PPTP connection logically should be established before executing the command, otherwise there might be no VPN interface which can be shown by ifconfig.).

Zugriff auf externe IPs im VPN in Mac OSX (1)Zugriff auf externe IPs im VPN in Mac OSX (2)

With the knowledge of the name of the interface, you can add the routing rule now.

sudo route add -net -interface ppp0

In the above command you only need to replace the by the destination network of your VPN connection and the ppp0 with the name of your VPN interface. After execution of the command the computers from the remote network should be reachable under their well-known IP addresses.

Zugriff auf externe IPs im VPN in Mac OSX (3)Zugriff auf externe IPs im VPN in Mac OSX (4)


Change “View Source” editor in Internet Explorer and Edge

Switch Editor in Internet Explorer

Those of you, who create websites do well to ensure that these are displayed correctly in all major browsers. But as most of you should know, due to differences between Internet Explorer, Firefox, Chrome and Safari this succeeds only in the rarest cases right away.

Thus, as a developer you’ll frequently have a look to the source code of a website, which in most cases just hurts in Internet Explorer, because the default editor of the “View source code” function is just a new window in IE instead of a good editor. Maybe it’s ok for a quick look, but not for getting work done.

Anyone who prefers to use Notepad++, SublimeText or another editor of choice to display the source code of a webpage in Internet Explorer, should give me his attention for the next minutes. In the following article I want to show you, how you can adjust the default editor in different Internet Explorer (IE) versions.

Change “View Source” editor in Internet Explorer 8-10

In Internet Explorer versions 8 to 10 the default source code editor can be modified easily via a menu setting. For this purpose, first the developer tools must be opened. This can be done either by pressing the F12 key or via the following menu path: Tools -> Developer Tools.

Internet Explorer 8-10 Sourcecode-Editor setzen - Step 1  Internet Explorer 8-10 Sourcecode-Editor setzen - Step 2

If the Developer Tools windows is shown, the settings can be accessed via the File menu. In the File menu click the “Customize Internet Explorer View Source”. That’s the point where the default source code editor can be set. By clicking the “Other …” button, you can choose any text editor you want.

Change the “View Source” editor in Internet Explorer 11

Unfortunately in Internet Explorer 11 this comfortable way of setting the default editor no longer exists. (Hey, this wasn’t done to annoy you, but to show you, that it’s an original Microsoft product. If it would have become easier it wouldn’t be a Microsoft product…)  In IE 11 the only way to change the “View Source” editor is an intervention in the Registry. Therefore open the Registry over the Start menu or via the Run dialogue (Win + R) and the command “regedit”. The necessary adjustments must be made below the following key:

HKEY_CURRENT_USERSoftwareMicrosoftInternet Explorer

First, a new key called “View Source Editor” must be created. Then another key named “Editor Name” must be created below the first key.

Internet Explorer 11 Sourcecode-Editor - Step 1  Internet Explorer 11 Sourcecode-Editor - Step 2

If both keys are created, the default value of the second key has to be adjusted. Here you enter the full path to your editor of choice.

Internet Explorer 11 Sourcecode-Editor - Step 3  Internet Explorer 11 Sourcecode-Editor - Step 4

Unfortunately this setting also brings an unsightly disadvantage, which is related to Microsoft’s Edge browser…

How to change the “View Source” editor in Microsoft Edge

Let’s talk about Microsoft’s latest browser – Edge. For this “browser” I’ve not found any solution to replace the default editor. Clicking on the “View Source” button will automatically open the Developer Tools – no ifs and buts. Also in the Microsoft forum there has been no solution until today.

However the following fact is just more worse. So Edge not only will not accept the registry settings for Internet Explorer 11 (see section above) , but also it gets broken by this settings. That means in plain text – one uses the above workaround to change the default editor for IE 11 and at the same time loses the opportunity in Edge to use the “View Source” button. Hey Microsoft, if the settings done work for Edge, please ignore them completely! Hopefully this will be fixed in the future!


Update: Cloud Downloader 2.9

Cloud Downloader 2.9The latest version of the cloud Downloader is not even a week old and still today there is a new update. In Version 2.9, there are contrary to 2.8 less new features as far more bug fixes.

I have revised the search algorithms as well as the download function and I hope to be able to deliver more “stable” results now. What has happened in detail, you can see from the list below.

Have fun with the new version and as always – thank you for your numerous feedback! (Since the last release I received more than 100 mails from you!)

Download: Cloud Downloader 2.9


Innovations and bugfixes in version 2.9:

  • Bugfix: “/search”-URLs will work again in the search
  • Feature: The donations dialog (which opens when closing the application) can be deactivated
  • Upgrade: Improved search and download algorithm
  • Upgrade: Improved error handling

Update: Cloud Downloader 2.8

Cloud Downloader 2.8

Since a couple of minutes the new version 2.8 of the CloudDownloader is available for you. At this point I would like to thank you for your numerous feedback that has been incorporated into the new version of Cloud Downloader.

In addition to a few bugfixes, the new version has mainly received your wishes and suggestions. I also added some small new features out of my head. You can see from the following list what has happened exactly.

As always, I look forward to your feedback. If you have ideas for improvements, just tell me!

Download: CloudDownloader 2.8

Innovations and bugfixes in version 2.8:

  • Bugfix: The “/tracks” URLs work again in the search.
  • Bugfix: Songs from the homepage (https://soundcloud.com/) can be found again.
  • Upgrade: When a song (for technical reasons) can not be downloaded, it will be skipped and displayed at the end in a list. (Previously an error always stopped the complete download list.)
  • Upgrade: Album cover/artwork should now always appear in good resolution. (Also available on Apple devices.)
  • Upgrade: D3 tags now support newlines/linebreaks.
  • Upgrade: The search box was expanded by a “clear” and a “paste” button.
  • Upgrade: Update dialog improved. (Partial the links in the update message led on old versions.)
  • Feature: On request, the title can also be written in the ID3 tag album field. (Some players show the artwork only if the album field is filled.)
  • Feature: On request, HD downloads are now available in their original format (eg WAV, WMA, etc.). The downloader won’t wrap any file as mp3-format as long as you wish so.
  • Feature: By using the “-s”-parameter, the CloudDownloader can be started from commandline into searchmode.
  • Feature: If a download breaks or no songs are found, an error dialog will be shown. Here you can send me the error with just one click, so that I can fix it faster.
  • Feature: After use of the program, a small request on my part appears.

Download: CloudDownloader 2.8


Cloud Downloader 2.8 - new download settings   Cloud Downloader 2.8 - send error to developer dialog

Cloud Downloader 2.8 - console parameters   Cloud Downloader 2.8 - new search help

Page 1 of 35