Page tree
Skip to end of metadata
Go to start of metadata


SAPGUI shortcuts are files located on a computer with SAPGUI for Windows installed, which are used to login directly to a SAP system, or run directly a SAP transaction, or entering okcode commands on modal dialogs.

How to create a SAPGUI shortcut

There are 4 ways to create a SAPGUI shortcut:

Approach 1:

  • Click on the Create shortcut icon on the toolbar in a SAPGUI session

  • In the popup window, enter the values you need

    See SAP Library and note 103019 in Links chapter below for more information. The TYPE field may be Report, Transaction or System Command (this late one is useful for entering /H in popup windows)

  • A shortcut on the Desktop (or the location you entered) will be created

Approach 2:

  • From desktop, choose Create SAP Shortcut using contextual menu and enter file name with extension .sap
  • Then choose Modify in the SAP Shortcut contextual menu and enter Shortcut attributes as above

Approach 3:

  • Create a text file with .SAP extension on the desktop with this kind of content (replace the values with your local ones):

    Description=04 - **** Solman ****
    WorkDir=C:\Documents and Settings\albert\SapWorkDir

    The parameters are more or less explained in note 103019 below, as the sapshcut.exe parameters have the same names.

Approach 4:

  • It is also possible to create a shortcut file from an ABAP program by calling SWN_CREATE_SHORTCUT function module, and save the text to a file (using GUI_DOWNLOAD function module). See the wiki in the Links below.

How to execute a SAPGUI shortcut

There are 3 ways to execute a SAPGUI shortcut:

  • Double-click the .SAP file from Windows desktop or Windows explorer
  • You may execute a .SAP file by sapsh.exe before 4.5 and sapshcut.exe after 4.5
  • Drag and drop the .SAP file to an existing SAPGUI session window. It is especially useful for system commands (okcode commands) that need to be entered on a modal window (popup) as the okcode field is protected, like /H, /RON, /ROFF, etc.
    • Locate the window of your SAP popup window:

    • Display desktop by Windows-D key, then drag (do not drop) the shortcut to the window

    • Drag the shortcut to the popup window:

    • Drop it:


  • No labels


  1. Unknown User (k2idb2z)

    If you need to execute the downloaded file at runtime you can use   CL_GUI_FRONTEND_SERVICES=>EXECUTE.

  2. Hello Sandra....great post...approach 3 worked like a charm.  Thanks.  James