There are two things you’ll need to setup in order to run Gui Scripts. First you’ll need to configure your client, then the system that you are connecting to.
Step 1: Setup your SAP GUI client scripting
First, you’ll need to setup the SAP GUI Client to allow scripting on your local machine. The following procedure shows an example with a client running SAPGUI 7.30 on Windows.
In the options panel of your GUI, you’ll need to select Accessibility & Scripting and then Scripting in the left hand column. Then you are presented with three checkboxes.
To allow Qualibrate to record SAP events, make sure you select the check boxes as the picture above. Here is a description of what each checkbox means:
- CHECK - Enable Scripting – This box simply allows scripting on your GUI. (Has nothing to do with the server)
- UNCHECK - Notify when a script attaches to SAP GUI – Pops up a yes/no box when a script attempts to use the GUI. This is useful to have on because it give you a point to make sure you want to run what you are running. If you don’t have this on, the script will run without any confirmation.
- UNCHECK - Notify when a script opens a connection – This setting pops up a confirmation when your script connects to a system. I generally turn this off when I run a script that connects to the system multiple times to do what it does. Otherwise I leave this setting on.
Once you’ve checked “enable scripting” you’re ready to run scripts on the client side. Next, you’ll need to check your settings on the server side.
Step 2: Setup SAP server-side scripting
You can enable scripting by setting the profile parameter sapgui/user_scripting to TRUE. The value set using this procedure will be lost when the system is restarted. If the administrator edits the application server profile of the SAP System to include sapgui/user_scripting = TRUE, scripting will be enabled by default when the server is restarted.
REMEMBER: ENABLING SCRIPTING IN PRODUCTION SYSTEMS IS GENERALLY A BAD IDEA.
- Start transaction RZ11
- On the Maintain Profile Parameters screen, enter “sapgui/user_scripting.”
- Choose Display.
- In the Display Profile Parameter Attributes screen, choose Change value.
- Enter “TRUE” in the new value field.
- Click the Save Button.
Step 3: Enable stable IDs on SAP Web applications (if applicable)
In case the following applications need to be automated, we recommend to implement this SAP note to enable stable IDs during the HTML rendering:
- SAP Web dynpro apps
- SAP CRM 7.x
- SAP SRM 7.x