SAP GUI For Java Connection Strings
A question I get often is about the way I connect to SAP ECC from my Mac.
Obviously, many users prefer to install Windows to their Macbooks and run SAP GUI For Windows over it.
However; SAP has an alternative less known GUI for Linux / Mac systems: SAP GUI For Java. You can download it from http://service.sap.com for free using an S-user, install it to your Mac like a regular application and connect to any SAP ECC system. No need to install Windows at all.
The way you define a new SAP Connection in SAP GUI For Java differs slightly from SAP GUI For Windows. Let’s assume that you have the following connection information:
- Address: 10.1.3.40
- System No: 02
In SAP GUI For Java, you need to get to the “Advanced” tab, click “Expert mode” and enter the following connection string:
conn=/H/10.1.3.40/S/3202
Obviously, the address goes between /H/ and /S/ and the system number goes to the end of the string. If your system ID is 00, you need to enter 3200. If your system ID is 07, you need to enter 3207. In our case, your system ID is 02 so you need to enter 3202.
That’s all there is! Using this connection string, you should be good to go.
Your connection string can contain additional parameters; such as your user name, client number, etc. Here are some sample connection strings:
conn=/H/sapsrv/S/3204&jenc=MacTurkish&jloc=tr&cpg=1607&clnt=100&user=kerem
Here are some sample connection strings going over routers (IP’s changed for security reasons):
conn=/H/88.249.244.45/H/10.0.0.5/S/3200 conn=/H/78.186.178.12/W/golive2013/H/192.168.2.10/S/3200
This blog entry is super useful because it's been hard for me to find the official documentation on PlatinGUI aka SAP GUI for Java connection strings. This blog entry has good google juice but the closest thing I could find to thorough documentation of all the parameters is here:
http://sites-final.uclouvain.be/sise/SAP//Manual-7.10r7/backgrnd/conndata.htm
It looks like that's coming out of a manual for 7.10, so it's out of date. Am I confused or is there an official manual that's pretty hard to search via https://launchpad.support.sap.com ?
Dear Ben,
Full set of fields (parameters) that could be included in the connection string can be found in "5.3.2 Connection Data" section of official Platin Manual.
As of version 7.50, applicable fields and their descriptions are listed below.
Kind regards,
Gökhan
Dear Dr. Kerem Koseoglu, your post has been really interesting to me. Because I've been looking for a post during several years about how configure SAP Gui for Java, and only in your I understood what's the correct way to do it.
Great post.
Nice blog. As non-Mac User it helps me when people with a Mac are joining my code jam events.
Best Regards,
Andre
Thank you!
Hello Kerem, Thank you so much, your post is very useful and it is also rarely to find someone who explain such topic easily and detailed like you. many thanks, it was very useful to me.
Very helpful..!!
Nice Work Kerem !!
Your blog helped me in installation and connection SAP GUI on MacBook pro.
Thx, is this still true? "The only disadvantage of SAP GUI For Java is for ABAP programmers: Smartforms designer, Workflow tools and graphical screen designer tools are Windows-only and won’t run under SAP GUI For Java. "
Yes, still true. However, non-graphical Workflow tools can be accessed under SWDD and non-graphical GUI tools can be accessed under SE51 (like in the old days).
Thx Dr. Kerem! Greetings from Mexico.
Alphanumeric Editor
Hello Karem, the post is very clear.
I have a problem with the S4 development environments, i mean, I can safely connect the quality and production environments but not the development environment, for example:
conn=/H/greatpost.prd/S/3200 is working
conn=/H/greatpost.qas/S/3200 is working
conn=/H/greatpost.test/S/3200 is not working de connection.
Error No 36 'Operation now in progress'
I tried entering the IP but the problem persists
the instance number is the same for three environments.
I use mac M1 and i dont have any problem in R3
When this problems occurs in WIN they update the file called Host or the file Services .
can you help me?
thanks
On Mac OS, there is a host file similar to Windows: /etc/hosts . There are several articles on how to edit that file; but basically, you put the hostname + corresponding IP address. After you do that, your connection should work just fine.
thanks for the response Kerem,
I already updated the host and services files but it still doesn't work, I don't understand why but I generally enter many environments but in some it is impossible for me to connect and the error message is always the same. (I put some X in the IP for a security issue)
"
Connection failed
Error: partner '10.92.X.X3X:3200' not reached
Mon Mar 7 15:12:51 2022
Release 753
Component NI (network interface), version 40
rc = -10, module
/net/usr.delivery/SAPGUIForJava_750_REL/bas_753_REL/src/base/ni/nibuf.cpp, line
4568
Detail NiBufIConnect: connection pending after 10000ms
System Call connect
Error No 36
'Operation now in progress'
Technical Details
java.lang.Exception: Error: partner '10.92.X.X3X:3200 not reached
Mon Mar 7 15:12:51 2022
Release 753
Component NI (network interface), version 40
rc = -10, module /net/usr.delivery/SAPGUIForJava_750_REL/bas_753_REL/src/base/ni/nibuf.cpp, line 4568
Detail NiBufIConnect: connection pending after 10000ms
System Call connect
Error No 36
'Operation now in progress'
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.processOpenRequest(GuiNiNetConnection.java:329)
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.handleOpenRequest(GuiNiNetConnection.java:158)
at: com.sap.platin.base.connection.GuiConnection.processCreateReply(GuiConnection.java:533)
at: com.sap.platin.base.connection.GuiConnection.handleCreateReply(GuiConnection.java:506)
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.handleCreateRequest(GuiNiNetConnection.java:148)
at: com.sap.platin.base.connection.GuiConnection.open(GuiConnection.java:334)
at: com.sap.platin.base.application.GuiApplication.createConnection(GuiApplication.java:936)
at: com.sap.platin.base.logon.GuiLogonLS.lambda$doConnect$0(GuiLogonLS.java:2893)
at: java.base/java.lang.Thread.run(Thread.java:834)
caused by : java.io.IOException
java.io.IOException
at: com.sap.platin.r3.protocol.ni.JniAgComAdaptor.connect(JniAgComAdaptor.java:44)
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.processOpenRequest(GuiNiNetConnection.java:288)
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.handleOpenRequest(GuiNiNetConnection.java:158)
at: com.sap.platin.base.connection.GuiConnection.processCreateReply(GuiConnection.java:533)
at: com.sap.platin.base.connection.GuiConnection.handleCreateReply(GuiConnection.java:506)
at: com.sap.platin.r3.protocol.ni.GuiNiNetConnection.handleCreateRequest(GuiNiNetConnection.java:148)
at: com.sap.platin.base.connection.GuiConnection.open(GuiConnection.java:334)
at: com.sap.platin.base.application.GuiApplication.createConnection(GuiApplication.java:936)
at: com.sap.platin.base.logon.GuiLogonLS.lambda$doConnect$0(GuiLogonLS.java:2893)
at: java.base/java.lang.Thread.run(Thread.java:834)
"
do you have any other ideas?
Thank you very much for your attention and time.
Best regards
Ezequiel
This may be a networking issue. Check if you can access SAP via the regular SAP GUI from the same machine. You may also try to ping / telnet / etc. 10.92.X.X3X:3200 from your favorite networking tools.
Hello, how to provide the System ID? Cannot connect because System ID is cleared / not accepted in Mac SAP GUI for Java.
I am able to provide a system ID in my connection strings. Here is an example - check the parameter "systemName":
I tried to use SAPGUI for JAVA with Screen Painter(Layout Editor) for ABAP development but it was very difficult.
Is this not allowed?
Check the last paragraph of my blog post. Already explained there.
thank you for reconfirming that.
I installed in windows, while when I login to a system, I met this error message:
but in my computer , the file C:\Windows\UEM.exe does not exist in my computer.
so how to remove this message ?
Read access to list files in "C:\Windows\UEM.exe" has been denied:
java.security.AccessControlException: access denied ("java.io.FilePermission"
"C:\Windows\UEM.exe" "read")
=============================================================
Request environment
=============================================================
SU: EGQ:S000:SAPMSYST:38c8f000
TL: Level4: Trusted
CS: /C:/Users/ABC/SAP%20Clients/SAPGUI%20for%20Java%207.80beta16/jar/platinr3S.jar
PL: com.sap.platin.base.security.SAPGUIPolicy
PR: permission java.io.FilePermission "C:\Windows\UEM.exe", "read";
PR: canonical file name: C:\Windows\UEM.exe
=============================================================
Trustlevel grant block
=============================================================
grant principal com.sap.platin.base.security.GuiSessionPrincipal "#Level4" {
permission java.lang.RuntimePermission "getenv.*";
permission com.sap.platin.base.security.ApplicationPermission "<<ALL FILES>>", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\SAP Clients\SAPGUI for Java 7.80beta16\bin\guilogon.bat", "openApplication";
permission com.sap.platin.base.security.ApplicationPermission "*", "openURL";
}
=============================================================
Temporary permissions
=============================================================
Key: 22745769:listFiles
principal com.sap.platin.base.security.GuiSessionPrincipal "ECQ:S000:SAPMSYST:22745769" {
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\*", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\-", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer", "read";
}
Key: 2daa3af1:listFiles
principal com.sap.platin.base.security.GuiSessionPrincipal "EGQ:S000:SAPMSYST:2daa3af1" {
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\*", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\-", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer", "read";
}
Key: 38c8f000
principal com.sap.platin.base.security.GuiSessionPrincipal "EGQ:*:*:38c8f000" {
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\tmp\*", "read,write,delete";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\work", "read,write,delete";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\work\-", "read,write,delete";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\tmp\-", "read,write,delete";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\work\*", "read,write,delete";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\tmp", "read,write,delete";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\work\*", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\*", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\tmp\*", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\-", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\tmp\-", "openDocument";
permission com.sap.platin.base.security.ApplicationPermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\EGQ.38c8f000\work\-", "openDocument";
}
Key: 38c8f000:listFiles
principal com.sap.platin.base.security.GuiSessionPrincipal "EGQ:S000:SAPMSYST:38c8f000" {
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\*", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\-", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer", "read";
}
Key: 6ebce7b6:listFiles
principal com.sap.platin.base.security.GuiSessionPrincipal "ECQ:S000:SAPMSYST:6ebce7b6" {
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\*", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer\-", "read";
permission java.io.FilePermission "C:\Users\ABC\AppData\Local\Temp\ABC\SAPGUI\Transfer", "read";
}
Technical Details
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Windows\UEM.exe" "read")
at: java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:485)
at: java.base/java.security.AccessController.checkPermission(AccessController.java:1068)
at: com.sap.platin.r3.control.GuiSapInfo$10.run(GuiSapInfo.java:2116)
at: com.sap.platin.r3.control.GuiSapInfo$10.run(GuiSapInfo.java:2070)
at: java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at: java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:509)
at: com.sap.platin.r3.control.GuiSapInfo.listFiles(GuiSapInfo.java:2069)
at: java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at: java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at: java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at: java.base/java.lang.reflect.Method.invoke(Method.java:568)
at: com.sap.platin.base.automation.GuiClassDescriptor.invoke(GuiClassDescriptor.java:152)
at: com.sap.platin.base.automation.GuiAutomationDispatcher.invoke(GuiAutomationDispatcher.java:573)
at: com.sap.platin.base.automation.GuiAutomationCall.invoke(GuiAutomationCall.java:212)
at: com.sap.platin.base.automation.GuiAutomationProcessor.processAutomationCallList(GuiAutomationProcessor.java:210)
at: com.sap.platin.base.automation.GuiAutomationProcessor.processDataFromServer(GuiAutomationProcessor.java:159)
at: com.sap.platin.base.automation.GuiAutomationProcessor.handleDataFromServer(GuiAutomationProcessor.java:74)
at: com.sap.platin.base.protocol.GuiMultiplexer.processDataFromServer(GuiMultiplexer.java:206)
at: com.sap.platin.base.protocol.GuiMultiplexer.run(GuiMultiplexer.java:59)
at: java.base/java.lang.Thread.run(Thread.java:833)
Thanks Kerem Hocam I'm proud of you =)