cancel
Showing results for 
Search instead for 
Did you mean: 

How to get selected text from DropdownbyKey in WDA?

Former Member
0 Kudos

Hi all,

I am able to get selected key from dropdownbykey UI element in WDA.

But I also want to get selected text from dropdownbykey UI element in WDA.

The reason is, I am populating values like below.

Key     Text

---------------------------

1         0001 - AAA

1         0002 - BBB

2         0001 - CCC

2         0002 - DDD

How do I get the textvalue for selected item in the dropdown?

Thanks

Thruna

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Thruna,

When dropdown options come from a domain, you can get the text values as DD07T directly

Former Member
0 Kudos

Amy,

You are correct.

Using non-unique key values in DDBK is a not recommended.

Reason is If I select 0002 - BBB, system automatically set the selected text as 0001 - AAA because of duplicate key 1 in this case.

Key     Text

---------------------------

1         0001 - AAA

1         0002 - BBB

2         0001 - CCC

2         0002 - DDD

Thank you for all your replies.

Thanks

Thruna

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

As subhash told you can use FM  GET_DOMAIN_VALUES  so that you will get values for domain .

read that itab into ls_itab  with key domvalue_l = lv_xxx.

if sy-subrc ,is initial.

concatenate ls_itab-domvalue_l   '-' ls_itab-ddtext into ls_yyyy.

endif.

you can use ls_yyyy how ever you want.

Former Member
0 Kudos

Hi

(values DD07L and texts DD07T)

CHECK_DOMAIN_VALUES  

GET_DOMAIN_VALUES 

http://www.saphub.com/abap-dictionary/read-sap-domain-value-range/