4 Replies Latest reply: May 17, 2011 10:40 PM by Andrew Tooke RSS

SAPGui for Java Configuration - How to ?

Wolfgang Pungartnik
Currently Being Moderated


just downloaded SAPGui for Java 7.20 rev4 and installed it on a local solaris box to quickly show the solaris guys what they are supporting on their machine. Unfortunately configuration (adding a sessions) seems to be quite complicated. Reading the docs i noted that i have to prepare several configuration files to be able to add a new session to the gui.


Isn't there any convenient way like the SAPlogon on windows where you just specify the location of your SAP message server, select the logon group and that's it ?


On windows it's like 10 seconds to configure a new session but using the Platingui i cancelled the demo after 15 minutes not been able to add a session.


Any hints for a quick configuration ?



  • Re: SAPGui for Java Configuration - How to ?
    Rolf-Martin Woersinger
    Currently Being Moderated



    the connection strings to be entered when not using the configuration files are described in chapter 9.1 Technical Background - Connection Strings of the manual of SAP GUI for Java.


    In your case, you need to know the message server, its port-number and the group name.

    Then you will have a connection string like


    on the "advanced" tab of the  "new connection" dialog.


    Best regards


  • Re: SAPGui for Java Configuration - How to ?
    Andrew Tooke
    Currently Being Moderated

    Create new item.  Go to the advanced tab and select expert mode.


    For a direct conncetion...




    replace 00 with your system number.


    For load balaning server




    replace 00 with your system number.

    replaced PUBLIC with your group/server name - this is the group/server field in the windows SAP logon launchpad.

  • Re: SAPGui for Java Configuration - How to ?
    Wolfgang Pungartnik
    Currently Being Moderated

    Thanks to both.


    Well, that's what i found out so far. Just thought it could a little bit easier than specifying the connection string myself.

  • Re: SAPGui for Java Configuration - How to ?
    Andrew Tooke
    Currently Being Moderated

    I think i've found what you need.  Check where your SAP directory.  On my installation there is a file in ../sap/SAPGUI7.20rev5/doc/admconf/guiconf.htm#Local_Configuration_Files . 


    This should open in a web browser and details how to setup, here is an extract of that file, see the local configuration section 1/2 way down...


    Administration - Configuration Files

    Centrally-Managed Configuration


    To allow for central configuration management within an enterprise, the local configuration file can include a reference to a central configuration file (which is typically located on an intranet web server). The format of local and central configuration files is identical. Both the local and the included configuration file are evaluated by SAPGUI for the Java environment. Locally stored settings always take precedence over settings taken from an included configuration file.


    It is recommended to store at least the message server list and the router list locations in central configuration files and that you configure all front-end computers to include the central configuration file. SAP systems relevant to all users can also be put into the central configuration file, so that they are available at all front-end computers. In such an environment, the only setup activity required by the end user is to enter the URL for the central configuration file in the 'Include Configuration File' field of the 'Options/Preferences/Configuration' dialog.


    A configuration file can contain the following directives (they must occur only once for each configuration file):


        @INCLUDE = <included configuration file>

        @MESSAGESERVER = <message server list>

        @ROUTER = <router list>

        @CONNECTIONTREE = <connection hierarchy>



    • <included configuration file>: file name or URL of a central configuration file. The content of the included configuration file is evaluated as if it was copied into the local configuration file. This is typically used in a local configuration file.


    • <message server list>: file name or URL of the message server list (see Message Server List). This is typically used in a central configuration file that is included from local configuration files.


    • <router list>: file name or URL of the router list (see Router List). This is typically used in a central configuration file that is included from local configuration files.


    • <connection hierarchy>: file name or URL of the file defining the hierarchy of items in SAP logon. This is typically used in a central configuration file that is included from local configuration files in case the administrator intents to predefine a structure valid for all users. There is no description of the file format, since editing it manually will likely break it.


    Additionally, the file may contain multiple lines, each describing an SAP system in the following format (without the blanks and quotes):


        <system description> ":" <connection data>



    • <system description>: descriptive name of the SAP system as it is to appear in the system list within the logon window.


    • <connection data>: the connection string of the SAP system. For details about connection strings, see Connection Data. Note that the connection data for each SAP system is displayed on the 'Advanced' tab in the connection dialog box (See Defining SAP systems).


    Anything following a '#' on a line is ignored as a comment.


    Example for a central configuration file 'guiconfig.txt' on the webserver 'www.acme.com' in the directory 'gui/config', assuming that the message server list 'messageservers.txt' and the router list 'routers.txt' are stored in the same directory on the webserver:


        @MESSAGESERVER = http://www.acme.com/gui/config/messageservers.txt

        @ROUTER = http://www.acme.com/gui/config/routers.txt


        TST:conn=/M/msgserver.acme.com/S/4201/G/PUBLIC # Example system


    In this example, the only configuration entry required at the frontend computer would be the 'Include Configuration File' entry in the 'Options/Preferences/Configuration' dialog. All users would simply specify the following URL as their 'Included Configuration File' (see Setting Configuration Files for more information on how this is done):




    Local Configuration Files


    SAPGUI for the Java environment stores all of its local configuration information and user preferences in files. The files are located in a place that is platform-specific:



    • Windows XP: <home directory>\SAPGUI\


    • Windows Vista and Windows 7: <home directory>\AppData\LocalLow\SAPGUI\


    • Mac OS X: <home directory>/Library/Preferences/SAP/


    • Unix platforms: <home directory>/.SAPGUI/


    The following information is stored in the 'connections' file:



    • Connections to SAP systems defined by the user


    The following information is stored in the 'settings' file:



    • Location of an included configuration file (filename or URL) providing settings and connection data and links to message server and router information


    • Location of the message server list (filename or URL, possibly from include file)


    • Location of the router list (filename or URL, possibly from include file)


    • Options the user has defined in the preferences dialog (like fontsize, etc.)


    This information correspond to the entries made in the 'Options/Preferences/Configuration' menu (see Client Settings - Providing a Connection Directory) and the system list displayed in the logon window (see Client Settings - Selecting SAP Systems for Connection).


    The following information is stored in the 'connectionTree.xml' file:



    • Hierachical structure on the SAP logon items when using hierarchical view


    • User specific notes attached to a connection string


    These local personalization files are created empty when the SAPGUI for Java is started the first time, or they import the values stored in platin.ini from versions before 7.00, if present. Please note that this import only happens once.


    Important Note:


    Starting with SAPGUI for Java 7.00 and newer, the configuration files are read and written with UTF-8 encoding to ensure that characters not part of the current native encoding are correctly displayed and stored. Also, the configuration files used for centrally-managed configuration must be edited with an editor capable of storing in UTF-8 format. As an alternative the native2ascii tool, part of JDKs can be used firstly to convert the files into native encoding, and then edit the files, and afterwards to convert them back to UTF-8 for use by SAPGUI for Java.

    Installing Custom Templates


    The following allows you to provide customized templates for the URL of the configuration file and other settings during program:


       1. Create files named settings.template and/or connections.template with your customized content.

       2. Pack these files into a jar archive named templates.jar:

          jar -cf ./templates.jar settings.template connections.template

       3. Put the templates.jar file in the same directory as the SAPGUI for Java installation jar.

       4. Start the usual installation process.


    This procedure also works if you provide the SAPGUI for Java from a web server. Just copy the templates.jar archive into the same directory on your web server as the other components of the SAPGUI for Java.


    Note: These template files will only be activated, if there are no settings and connections files existing yet (location see above ). This is to prevent settings previously made by the user on the local client from being accidentally overwrittten.