Skip to Content

Convert saplogon.ini file to connections file for SAPGUI Java

Dear “Windows-to-Linux-Shifters”,

 

A few days ago I installed Ubuntu in a second partition on my Workstation. Everything went well so far. Eclipse was easy to install and the relocation of workspaces was a pleasure. As Linux in general has no problems in using data stored in a Windows (e. g. NTFS) partition, I did not have to copy huge amounts of data from my Windows partition to my new Ubuntu partition.

After playing a bit around with Ubuntu I started thinking about my next day in the project. A SAPGUI was required. Therefore I downloaded SAPGUI for Java environments from SAP Service Marketplace. The installation was easy and SAPGUI started properly on my Gnome Desktop.

Then, after SAPGUI finishes starting, I recognized the vacuum – There was no connection to any of my SAP systems configured. “OK” I thought “just go back to the Windows partition and copy saplogon.ini to my user’s home directory”.

After restarting SAPGUI the vacuum remains, unfortunately. Then I created a new connection to a random system and recognized that a file called “connections” changed its size. So, connections must be the file that contains the connections to my SAP systems. That must be the file to modify and to import the data stored in saplogon.ini to. Unfortunately, the connections stored in connections file look totally different from the connections stored in saplogon.ini.

Google did not give me any hints to a tool that was able to convert a saplogon.ini file to a connections file as used by SAPGUI for Java environments.

To keep things short: I implemented a small tool, that is able to convert a saplogon.ini file in a way, that the i nformation stored in it can be used by a SAPGUI for Java environments. It is implemented in Java. Here the link to JAR file: SapGuiIniToSapcConverter.jar. The tool can be used on Windows or Linux platforms, thanks to Java. Here is how to use it: Open your favorite command line (terminal on Linux / UNIX environments or command prompt in Windows environments) and type in the following command:

 

java -jar [complete path to SapGuiIniToSapcConverter.jar] [path to source saplogon.ini file] [path to target connections file]

Happy Hackin9!

–MIKE

4 Comments
You must be Logged on to comment or reply to a post.
  • But I have a small problem. Most of our systems are not having the “real” hostname in the [Server] section. Is it possible to modify the java program so you optionally can choose [MSSrvName] as source for the connection string?

    BR Morten

  • Hello Mike,

    I appreciate your effort for providing this tool to the community.
    However, I have one critical thought from a technical standpoint.

    From your description and from reading the decompiled code, it looks like it only takes the information of the current SAP Logon entries of SAP GUI for Windows and converts it to the format SAP GUI for Java can use. What it seems not to make available to SAP GUI for Java are all the message servers and routers, which are defined in sapmsg.ini and saprout,ini of the SAP GUI for Windows configuration but are not yet replicated to saplogin.ini. As a result, creating new SAP logon entries in SAP GUI for Java might not work similar like with the configuration of your SAP GUI for Windows.

    As an alternative, you can use the scripts we have published on the SAP GUI family page and we are using internally at SAP with great results. They also use sapmsg.ini, saprout.ini and the services file in order to make available the full range of information.
    http://scn.sap.com/docs/DOC-25456#section9, look for SAP GUI for Java Configuration.

    Hope this helps
    Rolf-Martin