cancel
Showing results for 
Search instead for 
Did you mean: 

In web dynpro abap How to set the default value in List box?

Former Member
0 Kudos

Hi Friends,

I have one issue, I bind one list box filled with email id, Suppose i select some values in listbox, its working fine, But in case of none of this value selection , automatically all the values selected. How to resolve this issue?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You put condition like that, if value is select then only process further.

If list box is initial through some message like, no value selected.

In your title you are asking default value?? just by setting/removing lead selection of node which you bind to list box,

you can manage this. try.

Cheers,

Kris.

Former Member
0 Kudos

Hi Krish,'

Thanks for reply, I use the function set lead selection index, but it cant select default

Former Member
0 Kudos

Hi

If you use DROPDOWNBY INDEX element, you would have binded the CONTEXT NODE with a table(dropdown values) and these are the values appear in the dropdown.

The lead selected index VALUE will be shown as default in the dropdown and you will have to set the LEAD SELECTION to the REQUIRED INDEX sothat it will be shown as default.

DATA: LD_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
 
      * get the code reference
      LD_NODE = wd_context->get_child_node( 'NODE_NAME' ).
       
     * set the lead selection to make it as default in dropdown
      LD_NODE->SET_LEAD_SELECTION_INDEX( INDEX = 1 ). //where 1s as default

If you are using drop down by key check this...

Cheers,

Kris.