GUI scripting and Windows scripting - Automate_Studio - 20.3

Automate Studio with Connect User Guide

Product type
Software
Portfolio
Integrate
Product family
Automate
Product
Automate > Automate Studio
Version
20.3
Language
English
Product name
Automate Studio
Title
Automate Studio with Connect User Guide
First publish date
2018
Last updated
2024-05-06
Published on
2024-05-06T08:28:10.436135

If your business process requires GUI scripting, this must be turned on—on your local computer and on the server. Contact your Automate administrator for more information.

If you are the Automate administrator, here are the instructions for turning on GUI scripting.

Enable scripting on the server side

SAP GUI scripting is turned off by default on SAP systems. To enable scripting, a Basis administrator must enable the parameter RZ11 and users must enable GUI scripting in their SAP GUI.

Both scripting support and the SAP GUI Logon pad are installed by default when the Windows SAP GUI client is installed. If they have not been installed, reinstall SAP GUI.

Enable the RZ11 parameter

  1. In SAP GUI, go to transaction RZ11.
  2. In the Param. Name box, type sapgui/user_scripting, and then click Display.

    Profile-parameter-maintenance

  3. Click Change Value.

    Profile-parameter-change-value

  4. In the New value box, type TRUE, and then click the Save button.

    Profile-parameter-new-value

Enable scripting in SAP GUI

  1. Click Customize customize sap, and then click Options.
  2. In the SAP GUI options dialog box, click Scripting, and then select Enable Scripting.

    SAP-GUI-Options-Scripting

  3. Click OK

GUI scripting on SAP GUI 720

To enable GUI scripting for SAP GUI 720, a few parameters must be set on the server side. These parameters do not necessarily exist on all SAP systems by default. If these variables are found in transaction RZ11, they must be set as follows:

sapgui/user_scripting_set_readonly = false

sapgui/user_scripting_disable_recording = false

sapgui/user_scripting_force_notification = false

Note: For information on security with GUI scripting, see the SAP Help.

sapgui/user_scripting_disable_recording

If this parameter is set to TRUE, script playback is possible, but recording is not permitted.

sapgui/user_scripting_force_notification

If this parameter is set to TRUE, a notification is always displayed at the front end, regardless of the client options.

Notification refers to the message box that appears before record and run for attaching to GUI scripting session.

sapgui/user_scripting_set_readonly

If this parameter is set to TRUE, scripts may act only on read-only user interface elements.

Enable GUI scripting for SAP GUI 720

  1. To open the SAP GUI options page, click Control Panel, click SAP Front End, and then click SAP GUI Configuration.
  2. Click Accessibility and Scripting.
  3. Under User Settings, click Enable scripting. Select any other options you want:
    • Click to be notified when a script is being attached to SAP GUI as you record or run a Transaction script.
    • Click to be notified when a script opens an SAP connection.

Windows scripting

With Windows scripting, which is enabled through GUI scripting, Studio Transaction records the Windows file selector dialog box in transactions that allow files to be attached. The file path is Windows_Dialog_file with the default value as untitled. Transaction sees only the dialog box; the name is added from the corresponding field in the Excel file.

A file name field is always recorded in the Mapper, whether a file was chosen in the dialog box or not. If you don’t want to upload a file, disable the dialog box fields.

If you want to upload a file, map the file-location field to an Excel column. When you run the script, the field must be mapped to the Excel column you want in the Mapper. Transaction selects the file from the specified location and creates the attachment.

Important: Windows scripting works only with GUI scripting. The file is not attached if the button click that creates the attachment is not recorded by Transaction and SAP. The dialog box is recorded even if you click Cancel. You must disable the Windows dialog box control that was recorded in the Transaction script. Ensure that you close other instances of SAP.