This information is based on SAP Note 480149:

advertisement
1
Enabling SAP GUI 6.20 Scripting Interface
By Ziv Kabaretti
October 22, 2002
Version 1.1
Based on SAP OSS Note 480149
Introduction ......................................................................................................................... 2
Ensuring Availability of the Scripting API on the Server .................................................. 2
Enabling Scripting on R/3 systems - Server Side ............................................................... 2
Table 1 – Required Basis Package and Kernel Patch Levels.............................................. 5
Enabling Scripting on SAP GUI 6.20 - Client Side ............................................................ 6
Appendix A – Checking the Current Kernel Patch Level................................................... 8
Appendix B – Checking the Current R/3 Support Package .............................................. 10
2
Introduction
Mercury Interactive’s support for the SAP GUI client version 6.2 is based on SAP’s Scripting API.
This API allows applications (such as Mercury’s testing tools) 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 Mercury Interactive’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_scripting to “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).
3
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.
4
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.
5
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
SAP_APPL
SAP_APPL
SAP_APPL
SAP_BASIS
SAP_BASIS
SAP_BASIS
SAP_BASIS
Release
Package Name
Kernel Patch Level
31I
40B
45B
46B
46C
46D
610
SAPKH31I96
SAPKH40B71
SAPKH45B49
SAPKB46B37
SAPKB46C29
SAPKB46D17
SAPKB61012
Kernel 3.1I level 650
Kernel 4.0B level 903
Kernel 4.5B level 753
Kernel 4.6D level 948
Kernel 4.6D level 948
Kernel 4.6D level 948
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.





6.20 and up
6.10: Kernel 6.10 patch level 391
4.6D: Kernel 4.6D patch level 972
4.6C: Kernel 4.6D patch level 972
4.6B: Kernel 4.6D patch level 972
See SAP OSS note #480149 for additional information and download instructions.
6
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 ”HKCU\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security”, 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
7
This can also be done by setting the registry values WarnOnAttach and/or WarnOnConnection
in “HKCU\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security” to 0.
8
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).
9
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.
10
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
11
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.
Download