Does SAP object exist
Before you begin:
Learn how to navigate the Wizard Editor
Understand how to Create wizards and use Advanced commands
Understand Variables
Learn how to customize Error handling within an advanced command
Understand how to configure Wizard fallbacks
The Does SAP object exist Dynamic Advanced Command is part of SAP commands, enabling various tasks with wizards in the SAP application. Use this command to check the existence of SAP GUI window elements, such as toolbars, menus, checkboxes, buttons, in the current user interface and store the result in a variable. To use this command in your automation workflow, drag it into a wizard by using the Advanced Command view in the Studio Wizard Editor.
For examples of using this command, see Example.
In the Advanced Command Editor, search for the SAP command and drag it into your steps. Then, follow the steps below for configuration:
-
Click Select an object.
-
Click any object within the SAP application to choose it.
-
(Optional) Use the buttons on the SAP object selector to refine your selection, visible in the Selected object field. The availability of certain buttons may depend on your selection.
-
Click OK.
-
Click the icon to test that the robot can find the selected object.
-
(Optional) Click Choose a different object to reselect an object in the application. Use this option if you want to pick a different field or button in the application.
-
Enter the variable name where you want to store the results of the selected object. This information is recorded in a variable list when the wizard is run.
-
Click OK.
The Does SAP object exist command allows you to interact with various SAP GUI window elements by combining commands to verify an object's existence and conditionally execute actions based on real-time conditions. This example shows the command's usage with the If Else command.
Follow the steps below to implement this example:
-
Add the Does SAP object exist command to the wizard by dragging it into the workflow.
-
Select the object using the Object selector and store the result in a variable (eg., Selection).
-
Add the If Else conditional command into the wizard by dragging it into the workflow, and customize its configuration to guide the wizard along one of two paths, depending on the specified condition. Additional conditions can be introduced as required.
In this scenario:
-
If the Selection equals true, meaning that the object Selection exists, the wizard clicks on the object labeled Personnel.
-
If the Selection equals false, meaning that the object Selection does not exist, the wizard logs out of SAP.
-