Nov 10, 2010

SAPGUI shortcuts

Introduction
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 a 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):
    [System]
    Name=YD1
    Description=04 - **** Solman ****
    Client=100
    [User]
    Name=ALBERT
    Language=
    [Function]
    Title=Debug
    Command=/H
    Type=SystemCommand
    [Configuration]
    WorkDir=C:\Documents and Settings\albert\SapWorkDir
    [Options]
    Reuse=1
    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 comments :