Skip to Content
avatar image
Former Member

dropdownbyindex default value

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 05, 2009 at 12:54 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 05, 2009 at 12:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded