cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down Box- Changing default value

Former Member
0 Kudos

Hi,

I have two drop down boxes (by index).

I have two screens in same view and these two drop down boxes are present in box the screens (same view but different tab strip).

Based on the data entered in the first screen, the dropdown box should have value A or B as default in .

For Example

drop down has two values. (A and B). By default A will be shown.

If field A (input field) is updated in screen 1, the drop down button in screen should have 'X' as default value.

If field B (input field) is updated in screen 2, the drop down button in screen should have 'Y' as default value.

How to change the default value.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

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 = 2 ). "where 2nd value i want here as default

Regards,

Manne.