How to Configure the SAP Environment

This task describes configure and verify the SAP environment for use with VuGen.

VuGen support for the SAP GUI for Windows client, is based on SAP's Scripting API. This API allows Vusers to interact with the SAP GUI client, receive notifications, and perform operations.

The Scripting API is available only in recent versions of the SAP Kernel. In kernel versions that support scripting, the option is disabled by default. In order to use VuGen, first make sure that the SAP servers support the Scripting API, and enable the API on both the server and clients. For more information and to download patches, see the SAP OSS note #480149.

Use IPV6 with a SAP installation

Create an SAP_IPV6_ACTIVE environment variable and set the value to 1.

Back to top

Check that SAPGUI Scripting API is enabled

Run the VerifyScripting.exe file from the Additional Components\SAP_Tools\VerifySAPGUI folder. For details, see Additional Components. For more information, see the file VerifyScripting.htm provided with this utility.

Back to top

Check the SAP GUI for Windows Client Patch Level

In your SAP GUI for Windows client, check the About box. The lowest patch level supported is version 6.20 patch 32.

Back to top

Check the Patch Level

  1. Open the SAP GUI logon window. Click the top left corner of the SAP Logon dialog box and select About SAP Logon from the menu.

  2. The SAP version information dialog box opens. Verify that the Patch Level entry is 32 or higher.

Back to top

Check the Kernel Patch Level

  1. Log in to the SAP system.

  2. Select System > Status.

  3. Click the Other kernel information button.

  4. In the Kernel Information section, check the value of the Sup. Pkg. lvl.

  5. The level must be greater than the level listed in the following chart depending on the SAP version you are using.

    Software Component
    SAP Release
    Kernel Patch Level
    SAP_APPL
    31I
    Kernel 3.1I level 650
    SAP_APPL
    40B
    Kernel 4.0B level 903
    SAP_APPL
    45B
    Kernel 4.5B level 753
    SAP_BASIS
    46B
    Kernel 4.6D level 948
    SAP_BASIS
    46C
    Kernel 4.6D level 948
    SAP_BASIS
    46D
    Kernel 4.6D level 948
    SAP_BASIS
    610
    Kernel 6.10 level 360

Back to top

Check the R/3 Support Packages

  1. Log on to the SAP system and run the SPAM transaction.

  2. In the Directory section, select All Support Packages, and click the Display button.

  3. Verify that the correct package is installed for your version of SAP according to the table below.

  4. Software Component
    Release
    Package Name
    SAP_APPL
    31I
    SAPKH31I96
    SAP_APPL
    40B
    SAPKH40B71
    SAP_APPL
    45B
    SAPKH45B49
    SAP_BASIS
    46B
    SAPKB46B37
    SAP_BASIS
    46C
    SAPKB46C29
    SAP_BASIS
    46D
    SAPKB46D17
    SAP_BASIS
    610
    SAPKB61012

    If the correct version is installed, a green circle appears in the Status column.

    If you do not have the OCS package installed, download it the from the www.sap.com Web site and install it. For more information, see the SAP OSS note #480149.

Back to top

Enable scripting on the SAP Application Server

A user with administrative permissions enables scripting by setting the sapgui/user_scripting profile parameter to TRUE on the application server. To enable scripting for all users, set this parameter on all application servers. To enable scripting for a specific group of users, only set the parameter on application servers with the desired access restrictions. The following steps describe how to change the profile parameter.

  1. Open transaction rz11. Specify the parameter name sapgui/user_scripting and click Display. The Display Profile Parameter Attributes window opens.

    If Parameter name is unknown appears in the status bar, this indicates that you are missing the current Support Package. Import the Support Package that corresponds to the SAP BASIS and kernel versions of the application server, as described in the steps above.

  2. If Profile Val is FALSE, you need to modify its value. Click the Change value button in the toolbar. The Change Parameter Value window opens. Enter TRUE in the ProfileVal box and click the Save button.

    When you save the change, the window closes and ProfileVal is set to TRUE.

  3. Restart the application server to apply your changes.

    If the updated ProfileVal did not change, even after restarting the server, then the kernel of the application server is outdated. Import the required kernel patch, as specified in the steps above.

    Note: The Profile Value may be dynamically activated in the following kernel versions, using transaction rz11, without having to restart the application server.

    Release
    Kernel Version
    Patch Level
    4.6B, 4.6C, 4.6D
    4.6D
    972
    6.10
    6.10
    391
    6.20
    all versions
    all levels

Back to top

Enable scripting on SAP GUI 6.20 client

To allow VuGen to run scripts, you must also enable scripting on the SAP GUI client. You should also configure the client not to display certain messages, such as when a connection is established, or when a script is attached to the GUI process. The following steps describe how to configure the SAP GUI client to work with .

  1. During installation. While installing the SAP GUI client, enable the SAP GUI Scripting option.

  2. After installation. Suppress warning messages. Open the Options dialog box in the SAP GUI client. Select the Scripting tab and clear the following options:

    • Notify when a script attaches to a running GUI

    • Notify when a script opens a connection

    • You can also prevent these messages from popping up by setting the values for WarnOnAttach and WarnOnConnection to 0 in the following registry key:

      HKCU\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security. 
      

Back to top

Examine the hierarchy of GUI Scripting objects - Optional

The SAPGUI Spy utility, is part of the Additional Components. It examines the hierarchy of GUI Scripting objects, in open windows of SAPGUI Client for Windows.

To install the SAPGUI Spy component:

  1. Copy the files mscomctl.ocx, Msflxgrd.ocx and msvbvm60.dll from the SAP_Tools\SapGuiSpy\System32VBdlls folder to your Windows System32 folder.
  2. Register the files.

    1. In the Windows Run box, enter: regsvr32 <File name>

    2. Run the SapSpy.exe file from the SAP_Tools\SapGuiSpy folder.

Back to top