Since I’ve started working for my current employer, my colleagues and I have occasionally received the following question from various Mac admins:
“I’m using SAP in my environment. How do I deploy the Mac software for SAP?”
When we’ve followed up for more details, the “Mac software for SAP” usually means the SAP GUI software. SAP GUI comes in two flavors:
SAP GUI for Java supports the following operating systems:
- openSUSE
- Fedora
- macOS
- Microsoft Windows
- AIX
- Ubuntu
The SAP GUI for Java is what’s available for macOS, so how to get it and deploy it? For more details, please see below the jump.
Pre-requisite
SAP GUI is a Java application, so Java must be installed before proceeding further. As of October 11, 2018, I recommend installing the latest Oracle Java 8 JDK for macOS.
The Java JDK can be downloaded from the following website:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Getting the SAP GUI for Java software
1. Go to the following link:
https://support.sap.com/en/my-support/software-downloads.html
2. Click on Support Packages & Patches
3. Click on Access Downloads
4. Select By Category
5. Select SAP Frontend Components
6. Select SAP GUI for Java
7. Click on the latest SAP GUI for Java
As of October 11, 2018, this will be SAP GUI for Java 7.50
8. Verify that the Items Available to Download drop-down menu is set to MAC OS
9. Select and download the latest available PlatinGUI .jar file.
Building configuration files
Along with the SAP GUI application, you can also prepare a set of pre-configured settings files for SAP GUI. These configuration files are described as part of the documentation for SAP GUI, in the Administration: Configuration Files section
Once you have your connections and settings files configured the way you want them, export them and name them as follows:
Connections: connections.template
Settings: settings.template
If you have additional exported settings, also follow the .template naming scheme.
Once you have your .template files ready, use the following Java command to create a file named templates.jar:
jar -cf /path/to/templates.jar /path/to/filename1.template /path/to/filename2.template /path/to/filename3.template
For example, if I have a settings.template file and a trustClassification.template file stored in my home folder, I would use the following Java command to create a templates.jar file on my user account’s Downloads folder:
jar -cf /Users/username/Downloads/templates.jar /Users/username/settings.template /Users/username/trustClassification.template
The .template files are stored inside the templates.jar file:
If the templates.jar file is in the same directory as the PlatinGUI .jar file when the installation process is run, the .template files will be installed along with the SAP GUI application and stored in SAP GUI.app/Contents/Resources.
When a user launches the SAP GUI application, if they do not already have an ~/Library/Preferences/SAP directory, the settings.template and trustClassification.template files will be copied to the ~/Library/Preferences/SAP directory with the following filenames:
- ~/Library/Preferences/SAP/settings
- ~/Library/Preferences/SAP/trustClassification
Building the SAP GUI installer
Pre-requisites:
- Packages
- SAP GUI for Java installer (this is the PlatinGUI .jar file)
- templates.jar file (optional)
1. Set up a new Packages project and select Raw Package.
2. In this case, I’m naming the project SAP GUI 7.50 rev4.
3. Once the Packages project opens, click on the Project tab. You’ll want to make sure that the your information is correctly set here (if you don’t know what to put in, check the Help menu for the Packages User Guide. The information you need is in Chapter 4 – Configuring a project.)
In this example, I’m not changing any of the options from what is set by default.
4. Next, click on the Settings tab. In the case of my project, I want to install with root privileges and not require a logout, restart or shutdown.
To accomplish this, I’m choosing the following options in the Settings section:
In the Tag section:
Identifier: set as appropriate (for my installer, I’m using com.sap.pkg.SAPGUI750rev4)
Version: set as appropriate (for my installer, I’m using 7.50.04 )
In the Post-installation Behavior section:
On Success: should be set to Do Nothing
In the Options section:
Require admin password for installation should be checked
Relocatable should be unchecked
Overwrite directory permissions should be unchecked
Follow symbolic links should be unchecked
5. Select the Payload tab. Nothing here should be changed from the defaults.
6. Select the Scripts tab. Under the Additional Resources section, add the following file:
The SAP GUI for Java installer (this is the PlatinGUI .jar file)
If you have a templates.jar file, also add that file.
7. The last part is telling the SAP GUI for Java installer to run with the correct options selected. For this, you’ll need a postinstall script.
See below the postinstall script being used for this installer package:
Once created, select the postinstall script and add it to the project.
8. Build the package. (If you don’t know to build, check the Help menu for the Packages User Guide. The information you need is in Chapter 3 – Creating a raw package project and Chapter 10 – Building a project.)
Testing the installer
Once the package has been built, test it by installing it on a test machine which has the following:
- Java installed
- Does not have the SAP GUI client installed
The end result should be that the SAP GUI client installs into /Applications.
If a templates.jar was included with the installer, the SAP GUI configuration template files specified by the templates.jar file should also be installed.