SAP Scripting

Enabled SAP GUI Scripting is a prerequisite for recognizing and interacting with SAP UI elements. If SAP Scripting is disabled, the corresponding selector values of the individual UI elements cannot be retrieved. Alternatively, one would have to use OCR and image recognition activities, which are typically less accurate and should therefore be avoided if possible. In order to access the UI elements of the application, SAP scripting must be enabled on the SAP server as well as on the clients, where the robot script is executed.

Enabling SAP GUI Scripting on the Server Side

  1. After starting the .exe and logging into your SAP server, the SAP Easy Access window opens.
  2. Run the transaction RZ11 (here, one can change profile parameters).
  3. Enter sapgui/user_scripting in the text field under Name/Parametername.

mceclip2.png

mceclip3.png

  1. Check if the current value is set to TRUE. If the value is FALSE, click on Change Value and set the New Value equal to TRUE. Confirm your changes by clicking the Save button. You might want to select the check box Switch on all servers if you operate multiple servers and you want to apply the changes to all of them.

mceclip4.png

  1. The changes do not affect your current session. After logging off and back on, the change should have been applied to your SAP environment. SAP scripting is now enabled.

 

Enabling SAP GUI Scripting on the Client Side

  1. Click on the Customize Local Layout button (or press Alt+F12) and select Options (or press O on your keyboard) from the appearing drop-down menu.

mceclip0.png

mceclip1.png

  1. The SAP GUI Options window opens. Select Accessibility & Scripting and then Scripting from the menu on the left side.
  2. Check the box Enable scripting under User Settings (it might already be checked by default)
  3. Verify that the options Notify when a script attaches to SAP GUI and Notify when a script opens are deselected. Otherwise, a popup appears every time when a robot script tries to interact with SAP, which would only introduce unnecessary complexity.

mceclip0.png

  1. Save your changes. SAP scripting is now also enabled on the local machine.

 

 
 

 

Was this article helpful?
0 out of 0 found this helpful