Configure the SAP environment

This task describes how to 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.

Use IPv6 with an SAP installation (optional)

If you are using IPv6 communication, create an SAP_IPV6_ACTIVE environment variable and set the value to 1.

For more information, see the information on Configuring SAP Systems for IPv6 in the SAP documentation library.

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 Components and applications. For more information, see the file VerifyScripting.htm provided with this utility.

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 relevant access restrictions.

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.

Back to top

Enable scripting on SAP GUI 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.

To configure the SAP GUI client:.

  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 Components and applications. 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