Search

SAP UI

Last Updated: Apr 27, 2020

Articles

The SAP UI node is used to automate the SAP applications which contains data grids, tables, and trees. SAP UI node is used to automate SAP applications.

Image description

Pre-Condition

Before designing a task using SAP UI node, it is necessary to do the following:

  • Enable GUI scripting in the SAP Logon application.
  • Create modules and familiarize the SAP Logon application using UI Learn.
  • Define the SAP Execution Execution Configuration in Jiffy.

Enabling GUI Scripting

In order to use the GUI scripting feature of SAP for SAP automation, the user must make sure that scripting enabled at 2 places:

  1. Client
  2. Server

Client Side

To enable GUI scripting on the Client side,

  1. Open the SAP Logon application.
  2. In the Connections folder, double click on the connection required. Image description
  3. Click on the highlighted icon and choose Options. Image description Image description
  4. In the Accessibility and Scripting drop-down, select Scripting. Image description
  5. In the User Settings section, check the Enable Scripting checkbox. Image description

    Make sure that the rest of the checkboxes are unchecked to avoid prompts when Jiffy connects to SAP.

  6. Click on the OK button to save.

Server Side

To enable the Profile parameter, sapgui/user_scripting_set_readonly,

  1. Log in to the **SAP ** server.
  2. In the Connections folder, double click on the connection required and type the client, username and password.. Image description
  3. In the T_CODE bar, enter the transaction code RZ11 and press the Enter key on the keyboard.

    Image description

    Contact the administrator in case there is no authorization to do this.

  4. Specify the Parametername as sapgui/user_scripting.

    Image description

  5. Click on the Display button.

    Image description

  6. In the Current Value of Parameter sapgui/user_scripting section, if the value of the Current Value field is FALSE, change it to TRUE.

    Image description

  7. Click on the Save button.

  8. Specify the Parametername as sapgui/user_scripting.

    Image description

  9. Click on the Display button.

    Image description

  10. In the Current Value of Parameter sapgui/user_scripting section, if the value of the Current Value field is FALSE, change it to TRUE.

    Image description

  11. Click on the Save button.

  12. Specify the Parametername as sapgui/user_scripting_set_readonly.

    Image description

  13. Click on the Display button.

    Image description

  14. In the Current Value of Parameter sapgui/user_scripting_set_readonly section, if the value of the Current Value field is FALSE, change it to TRUE.

    Image description

  15. Click on the Save button.

  16. Specify the Parametername as sapgui/user_scripting_disable_recording.

    Image description

  17. Click on the Display button.

    Image description

  18. In the Current Value of Parameter sapgui/user_scripting_disable_recording section, if the value of the Current Value field is FALSE, change it to TRUE. Image description

  19. Click on the Save button.

  20. Specify the Parametername as sapgui/user_scripting_force_notification.

    Image description

  21. Click on the Display button.

    Image description *

  22. In the Current Value of Parameter sapgui/user_scripting_force_notification section, if the value of the Current Value field is FALSE, change it to TRUE.

    Image description

  23. Click on the Save button.

  24. Restart the SAP Logon application to apply the changes.

Familiarizing The SAP Application

Jiffy UI automation framework allows user to automate user interface pages for any application. Consider a scenario of automating a SAP application.

Creating A SAP Application

To start with SAP UI automation, the user must create an application first. To create an application, do the following:

  1. Double-click on the SAP UI node.
  2. To create a new SAP Application, click on the New SAP Application radio button.

    Image description

    Add the following details:

    • App: Choose the SAP application to be automated.
    • App Name: Type the desired name of the SAP application.
    • Connection String: The connection string of the SAP Logon application.
    • Cluster: Select the required cluster from this drop-down. This is applicable only when the task is being executed using an Execution Bot

    Leave cluster name blank when the task is being executed using a [Developer BOT](/admin_guide/tenant-admin-activities/bot-management/developer-bots/).

  3. Alternatively, select any existing SAP application in the SAP Application drop-down if it matches the criteria of the user.

  4. Click on the CREATE & RECORD button to create the SAP application and begin recording the SAP application.

    After the App and the Configuration are created, if the App name is **Demo**, the name of the **Configuration** name will be concatenated with the App name and type of UI automation. Eg: Demo_sap.

Setting Up SAP UI Configuration:

  1. Double-click on the SAP UI node and then click on the Configurations tab.

  2. Select any existing configuration in the Configuration drop-down if it matches the criteria of the user or create a new configuration. The user can also edit, copy or delete the existing configuration by clicking on the Edit, Copy and Delete icons displayed against each configuration, respectively.

  3. Click on the + icon to create a new configuration if required. Image description

    Add the following details:

    • Configuration Name: Type a unique configuration name.
    • App: Select the SAP UI related application from this drop-down.
    • Application Path: Path of the SAP Application to be familiarized.
    • Connection String: URL of the SAP application to be automated. This can later be changed according to the requirement of the app.
    • Clusters: Select the required cluster from this drop-down.

Recording The SAP Application

After creating the SAP application, the steps for automation need to be recorded. Recording can be either of the following ways:

  1. Click on the RECORD button in the Configurations tab.
  2. Click on the Start Recording button in the Actions tab.
  3. Click on the CREATE & RECORD button while creating a new Application.

    The Developer Bot must be running while recording the SAP application. Read how to start the Developer Bot here.

    After the recording begins, a Jiffy UILearn tab opens. Do the following to continue with the recording:

  4. On clicking the RECORD button, a floating window of Jiffy UILearn opens for recording the actions performed on the required fields in the SAP application based on the URL mentioned in the Configuration tab which will be captured as the UI controls on creating an application.

    The UI Learn floating window can be minimized, maximized and closed using the buttons provided on the right top corner of the Jiffy UILearn floating window.

  5. If GUI scripting has been enabled properly on the client and the server, the HIT Switch button for familiarization will appear on the bottom-right corner of the UI Learn application.
    Image description

  6. Click on the HIT Switch button on the Jiffy UILearn floating window to perform the recording.

  7. Give a name for the Screen Ex: Screen1

  8. Learn the UI elements by placing the mouse pointer on the required field and then pressing the ctrl key. The selected UI element will be highlighted the in Red colour.

  9. The controls familiarized will be listed under the Screen1 screen. The names and actions of the controls can be edited as required.
    Image description

  10. Click on the Stop Recording button on the Jiffy UILearn floating window after recording is completed.

  11. Edit the lines of action that are recorded to finetune the performance of the SAP application as required. Read how to Design the SAP application.

Properties Of SAP UI Node

Image description

General Properties

  1. Name: Name of the node. A default name is displayed in this field, which the user can edit according to the task and the intent of using the node.
  2. Description: A short note on the purpose of the node.
  3. Close Application: After completion of SAP UI run, then it will close the SAP Application that is launched during the execution of the task when the Close Application toggle button is in ON state. When the user wants to retain a SAP Application to perform actions on it, then select the Close Application toggle button must be in OFF state.
  4. Close Application on Error: If it is ON, then the SAP application or Desktopsite which is launched during execution will close in case of any error in the flow of execution.
  5. Mark run Failure on Node Fail: When the Mark run Failure on Node Fail field is ON, if the node execution fails then the complete task execution is marked as fail.
  6. Continue on Failure: When the Continue on Failure field is ON, even if the node fails, the execution will continue to the next node. When the Continue on Failure field is OFF, if the node fails, the execution will not continue to the next node.

Advanced Properties

  1. Run Mode: The user can select any one of the following options from the Run Mode drop-down: 1. Run even if locked: The task runs even if the machine is locked. 2. Unlock and run: Unlocks the machine and runs the task.
  2. Lock After Run: Locks the machine after the node execution.
  3. Take Screen Shots: The user can select either Always or On Error option.
    • If the user selects Always, then the user can see the screenshot of every UI event step output in the form of images (SAP Application) after a run.
    • If the user selects On Error, the user can see the screenshot of the step which is failed. In case of any popup messages or any crash on the SAP application, the user can identify it from the screenshot. These images can be passed to next node for further.
    • If the user selects Off, no screenshots will be taken during the execution.

Refer to SAP With Login & Logoff Nodes sample task to know how to use SAP node in a task.

Did you find what you were looking for?