cancel
Showing results for 
Search instead for 
Did you mean: 

dropdownbyindex default value

Former Member
0 Kudos

Hi all,

I have go a dropdownbyindex UI element but i want to be able to display it with say the 3rd entry already selected. I can do this by moving the 3rd entry to the top of the table before displaying but was wondering if there was a way of doing this while keeping the enties in the same order? basically replicating the user selecting the 3rd entry but without any input from the user!

Any information would be much appreciated

Regards

Mart

Accepted Solutions (1)

Accepted Solutions (1)

pranav_nagpal2
Contributor
0 Kudos

Hi Mart,

you have to just set the index for making it default vale

see the below code

read table it_ddk into wa_ddk with key ca_key = 'IN' .
index = sy-tabix .
lo_nd_cn_ddkindexctr->set_lead_selection_index( index = index ) .

regards

Pranav

Former Member
0 Kudos

Excellent thanks very much for the help guys, that works a treat!

Mart

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mart,

Please use Set_lead_selection_index method using the reference of the node created for the Dropdown by INdex.

Give the index as an integer value, and it will set the Lead selection index to that value in the Dropdown.

Hope it helps you.

Regards,

Shashikanth. D

Edited by: Shashikanth Divakaruni on Jan 5, 2009 1:10 PM