Sub topic 12
Creating Desktop Shortcuts to Transactions
This chapter assumes you can start transactions from the command field, you know the transaction code (tcode) for the task you want, and you have SAP GUI for Windows installed with at least one saved system entry in SAP Logon. It covers how to create a desktop shortcut for a transaction, what the shortcut stores, how to change it, and where it goes wrong.
What a desktop shortcut does
A desktop shortcut is a file on your computer. When you double-click it, SAP GUI opens, connects to a given system and client, logs you on, and starts a transaction. You skip SAP Logon, the menu tree, and the command field.
This helps with a transaction you use daily, or with several systems that have the same layout, such as development and quality. Favourites do a similar job, but they live inside the system after you have logged on. A desktop shortcut works before you log on.
| Feature | Favourites | Desktop shortcut |
|---|---|---|
| Where it is stored | On the SAP server, per user | On your PC, as a file |
| Available when | After logon | Before logon |
| Tied to a system | Only the system it was created in | Yes, system and client are in the shortcut |
| Follows you to another PC | Yes | No, unless you copy the file |
Creating a shortcut from the GUI
The simplest method is the built-in wizard. SAP GUI for Windows offers it, but the web-based clients do not.
- Log on to the system where the transaction should run.
- Open the transaction, or stay in the Easy Access menu.
- Choose System > Create Shortcut.
- Fill in the dialog and confirm. The shortcut is saved to your desktop.
The dialog contains these fields:
| Field | Meaning |
|---|---|
| Type | What to start. Leave it as Transaction for this chapter. |
| Title | The label under the icon. |
| Comment | A tooltip shown when you hover over the icon. |
| System | The system entry from SAP Logon. |
| Client | The client number, for example 100. |
| User | Your user ID. Optional. |
| Language | A language key such as EN. Optional. |
| Command | The tcode to start, for example SU3. |
| Window size | Normal window, minimised, or maximised. |
Choose a title that tells systems apart. "SE16 PRD" and "SE16 QAS" are better than two icons both called "SE16".
The wizard fills in many fields from your current session, including system, client, user, language, and often the tcode of the current screen. Check each of them before you save. A shortcut made from a test system carries the test system's name.
What the command field accepts
The Command field is more flexible than a bare tcode. Common forms:
SU3starts the transaction in the normal way, and its initial screen appears.*SU3starts it and skips the initial screen when the transaction allows that. This is often combined with parameters.*SE16 TABNAME=T001starts the Data Browser with the table name already filled in. The parameter must match a field name on the screen, and that works only for fields that accept parameters. If a field is ignored, the transaction does not support that field this way.
Do not put the /n or /o prefixes in a shortcut. They switch or open sessions inside an existing logon, and a shortcut starts a new one. The wizard expects the plain tcode.
What happens when you double-click
The shortcut first starts a new logon, and that explains the behaviour you will see.
Two consequences follow.
- Each double-click normally makes a new logon, not a new session in an existing logon. Many open icons can use up the session limit your system sets for you. Many systems limit how many logons a user can hold, and the extra logon may trigger a warning about multiple logons.
- The shortcut gives you no extra rights. If your user lacks authorisation for the tcode, the system tells you after the logon, exactly as if you had typed the code yourself.
Using sapshcut.exe directly
The wizard writes a shortcut file, but behind it is a small program called sapshcut.exe, installed with SAP GUI. You can call it yourself from a batch file, a scheduled task, or a launcher script. This gives you control over options the wizard does not show.
A typical installation path is C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe. Yours may differ.
@echo off
rem Open SU3 in system DEV, client 100, English, in a maximised window.
"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe" ^
-system=DEV ^
-client=100 ^
-language=EN ^
-type=Transaction ^
-command=SU3 ^
-maxguiThe -system value is the name of the entry in SAP Logon, so it has to match your local configuration. The parameters used above:
| Parameter | Effect |
|---|---|
| `-system=` | System entry to connect to. |
| `-client=` | Client number. |
| `-user=` | User ID. If omitted, the logon screen asks for it. |
| `-language=` | Logon language. |
| `-type=` | What to start. For this chapter, Transaction. |
| `-command=` | The tcode, optionally with `*` and parameters. |
| `-maxgui` | Maximise the window. |
| `-reuse=` | `1` tries to use an existing connection to the same system, `0` forces a new logon. |
Use -reuse=1 when you want many shortcuts to share one logon. Support depends on the SAP GUI version and on whether the existing logon is in a state that allows reuse, so test it in your own setup.
Run the script from a command prompt first. If the parameters are wrong, you see the error immediately and not a window that closes.
Passwords: do not store them
sapshcut.exe has a -pw= parameter. Avoid it. A password stored in a shortcut or script is readable by anyone who can read the file, and that includes backups, shared drives, and screenshots of the properties dialog.
Your organisation may block shortcuts that carry passwords. Treat that as a policy and do not look for a way around it.
Changing and maintaining shortcuts
A saved shortcut has no editor in SAP GUI. You have these options:
- Right-click the icon and choose Properties. Some fields, such as the command, can be edited there. What you can edit depends on the SAP GUI version.
- Rename the file in the usual Windows way. The icon label is the file name, which can differ from the Title stored in the shortcut.
- Delete the shortcut and create a new one, which is often the fastest way to change the system or client.
- Copy the file to colleagues or to another PC. It works there if the system entry has the same name in their SAP Logon.
That last point causes the most trouble. A shortcut stores the logical name of a system entry, not its network address. If a colleague's SAP Logon calls the system "DEV - ERP" and your shortcut says DEV, it fails with a message that the system cannot be found. Agree on entry names within a team before sharing shortcuts.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| "System not found" or the logon never starts | The system name does not match an entry in SAP Logon. | Correct the name in the shortcut, or rename the SAP Logon entry. |
| Logon works, then an error says the transaction does not exist | A typo in the tcode, or the tcode is not available in that system. | Open the system, use **System > Status** to check, and retype the tcode. |
| Message that you have no authorisation | Your user lacks rights for that transaction. | Ask your authorisation administrator or the SAP support team, and give them the tcode and the system. |
| The wrong client opens | The shortcut was made while logged on to another client. | Edit the client or create it again. |
| A parameter in the command is ignored | The field name is wrong, or the transaction does not take parameters. | Check the field name, or start the transaction without parameters. |
| Logon warning about multiple logons | Each icon makes a new logon. | Use fewer icons at once, try `-reuse=1`, or switch to Favourites and sessions inside one logon. |
Choosing between shortcuts, Favourites, and sessions
Use a desktop shortcut when you want a one-click start from the desktop, and the transaction is tied to one system and client. Use Favourites when you are already logged on and want to organise many transactions in folders. Use /o when you are logged on and want a second window without a new logon, since that costs fewer resources and does not count against your logon limit.
You can combine them. Keep a handful of shortcuts for the things you open first each day, and keep the rest in Favourites.
Exercise
A colleague sends you a shortcut for transaction SU3. When you double-click it, SAP GUI reports that the system cannot be found, although you log on to the same system every day from SAP Logon. What is the most likely cause, and how would you fix it?
Show answer
A shortcut stores the name of a system entry in SAP Logon, not the network address. Your SAP Logon entry for that system probably has a different name from the one in the shortcut. Either edit the shortcut's system name through its Properties to match your entry, or rename your SAP Logon entry to match. After that, the shortcut should open the logon, and it will still ask for your password because the shortcut does not carry one.
Exercise
You want a shortcut that opens the Data Browser (SE16) with table T001 already entered, in client 100 of system QAS. Write the command-line call for sapshcut.exe, without any password.
Show answer
"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe" -system=QAS -client=100 -type=Transaction -command="SE16 TABNAME=T001" The `` skips the initial screen, and TABNAME=T001 fills the table name field. The install path may differ on your PC, and the system name must match your SAP Logon entry.