Enabling SAP GUI 6.20 Scripting Interface

LoadRunner’s support for the SAP GUI client version 6.2 is based on SAP’s Scripting API. This API allows applications (such as LoadRunner) to interact with the SAP client, be notified of user actions in it, and more.

The Scripting API is only available in recent versions of the SAP Kernel. Moreover, the option to use this API is disabled by default. Consequently, users of LoadRunner’s SAP 6.2 testing tools must first ensure that their servers support the Scripting API, and enable its use both on the server and on the clients.

The following sections discuss in detail the steps required to enable working with the Scripting API.

Ensuring Availability of the Scripting API on the Server

The Scripting API is only available in more recent versions of the SAP Kernel. The first step in enabling its use is therefore ensuring that the right kernel version is installed, and updating it if required. To do this, follow these steps:

1. Check Table 1 below for the minimum kernel patch level required, according to the version of the SAP Application Server you use.

2. Check which kernel version is currently installed. See Appendix A for instructions on how to check this.

3. If required – download and install the latest patch. Please refer to SAP OSS note #480149 for detailed instructions on how to perform this upgrade.

Enabling Scripting on R/3 systems – Server Side

By default, the scripting API is disabled in R/3 systems. The system administrator has to enable this support by setting the profile parameter sapgui/user_scriptingto “TRUE” on the application server. This way, an administrator can enable scripting either for all users of a given system (by setting the parameter on all application servers), or for a certain group of users only (by setting the parameter only on certain servers, which may have special access restrictions).

Updating the above profile parameter can be done in two ways:

1. Manual editing the application server configuration file, followed by a restart of the server. The exact procedure for doing so is described in SAP OSS note #480149.

2. Changing the parameter using transaction rz11.

Changing the parameter using transaction rz11 requires a recent package of the SAP application server to be installed. Without this package level installed, the Scripting API will still work, but enabling it can only be done manually (see #1 above).

The following instructions explain how to enable the scripting API using method #2 above – transaction rz11. As mentioned, using this transaction to update the parameter requires a minimal package level on the application server.

– Please refer to Table 1 for a list of the minimum package required on the application server for each version of this server.

– See Appendix B for instructions on how to find out what are the current packages installed on the server.

– If required, download and install the required package. See SAP OSS note #480149 for detailed instructions on how to do this.

Once the correct package is installed, you may proceed with the following instructions.

In transaction rz11, specify the parameter name sapgui/user_scripting and press the ‘Display’ button.

If the current value is FALSE, you will have to change it to TRUE, in order to allow the scripting. Select the ‘Change value’ button in the toolbar. A window will appear, in which you can enter the new value. Change the value from FALSE to TRUE, and click the save (icon) button.

When you save the change, the window closes and the current value of the parameter changes to TRUE. This change only becomes effective when you log onto the system again. Some kernel versions also require a restart of the application server – please see details below Table 1.

Troubleshooting:

· If the current value does not change as expected after you have saved the change, it means that the kernel is too old. In this case, install the required kernel patch, as specified earlier in this document.

· When searching for this parameter in the rz11 initial screen, getting a status bar message saying “Parameter name is unknown” means that the parameter cannot be changed using this transaction, due to a missing server package (as described above). In this case, you can either update the parameter manually on the server (see earlier in this section), or install the SAP server package that allows to update the parameter with this transaction – see Table 1 for details.

Table 1 – Required Basis Package and Kernel Patch Levels

Following are the support packages and kernel upgrades necessary in order to enable use of the Scripting API. As mentioned above, the kernel patches are required in any case, while the application server packages are only required to allow viewing and modifying the setting using the rz11 transaction.

Software Component Release Package Name Kernel Patch Level
SAP_APPL 31I SAPKH31I96 Kernel 3.1I level 650
SAP_APPL 40B SAPKH40B71 Kernel 4.0B level 903
SAP_APPL 45B SAPKH45B49 Kernel 4.5B level 753
SAP_BASIS 46B SAPKB46B37 Kernel 4.6D level 948
SAP_BASIS 46C SAPKB46C29 Kernel 4.6D level 948
SAP_BASIS 46D SAPKB46D17 Kernel 4.6D level 948
SAP_BASIS 610 SAPKB61012 Kernel 6.10 level 360

The parameter can be activated dynamically (i.e. without having to restart the application server), via transaction rz11, in the following kernel versions. In older versions (i.e. at least in the level described in the table, but lower than the one listed below), the application server must be restarted after the change is made.

q 6.20 and up

q 6.10: Kernel 6.10 patch level 391

q 4.6D: Kernel 4.6D patch level 972

q 4.6C: Kernel 4.6D patch level 972

q 4.6B: Kernel 4.6D patch level 972

See SAP OSS note #480149 for additional information and download instructions.

Enabling Scripting on SAP GUI 6.20 – Client Side

During installation of SAPGUI select the SAP GUI Scripting checkbox.

This also can be set by a registry key:
In ”HKCUSOFTWARESAPSAPGUI FrontSAP Frontend ServerSecurity”, change the UserScripting value from 0 to 1.

By default, the GUI notifies the user when script is attached to the GUI process. In order to eliminate those windows massages warnings when using the testing tools, you can go to the SAP GUI options dialog, and uncheck the 2 check boxes:

· Notify when a script attaches to a running GUI

· Notify when a script opens a connection

This can also be done by setting the registry values WarnOnAttach and/or WarnOnConnection in “HKCUSOFTWARESAPSAPGUI FrontSAP Frontend ServerSecurity” to 0.

Appendix A – Checking the Current Kernel Patch Level

1. Log in to SAP system

2. Select from menu System à Status…

3. Click on Other kernel info… button (the yellow arrow icon).

4. Check at the Kernel Information section for the Sup. Pkg. Lvl.

If the kernel patch level is lower than the level required in table 1 (according to your installed version), you will need to download the latest kernel version and upgrade your system.

See SAP OSS note #480149 for more details.

Appendix B – Checking the Current R/3 Support Package

How to check the R/3 support packages:

1. Log in to SAP system

2. Run SPAM transaction

3. Choose All Support Package under Directory, press the Display button

4. Check that under SAP_BASIS, you have the required support package installed.It should be marked with a green light under the Status column.

If the Basis package level is lower than the level required in table 1 (according to your installed version), you will need to download the latest package version and upgrade your system.

See SAP OSS note #480149 for more details.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s