How to handle drop-downs in SAP
How to handle drop-downs in SAP
Introduction
Leapwork handles dropdowns in SAP using two different ways.
- Select by Args.
- Select by key.
Select by Args
This method is used to select a value from a dropdown using Args.
To get the value of args from a dropdown, the users are required to use an SAP Action block and capture the SAP element, select Get Attribute as an action, and Args as the attribute name.
In order to select a dropdown using Args value, users need to use the SAP action block with the "Set attribute" as an action, "args" as the attribute name, and specify the value of Args in the value option.
In the above screenshot, the dropdown value is now selected as "Credit limits".
Select by key
SAP GUI list may only show descriptive values for the list. While there are keys configured for each such value, these key values may not be visible when the user runs the transaction. This is controlled under options in the GUI. To enable it, please follow the below instructions:
Click on the "Customize Local Layout" icon or "ALT+F12" from within your SAP GUI.
On the left navigational pane, expand Interaction Design and select Visualization 1.
Enable "Show keys within dropdown lists" for the most efficient keyboard input at the controls section on the right side.
Click on Apply.
This method is used to select a value from a dropdown using Key values. To get the value of args from a dropdown, the users are required to use an SAP Action block and capture the SAP element, select "Get Attribute" as action, and "Key" as the attribute name.
In the above scenario, the key value is "01" and it is already selected in the dropdown. In order to select a dropdown using a key value, users need to use an SAP action block with the "Set attribute" as an action, "key" as the attribute name and specify the value of the key in the value option.
In the above screenshot, the dropdown is set to a value with 44 as a key.
Note: Leapwork supports SAP GUI 7.
For any clarification, contact our Priority Support.