Skip to Content
avatar image
Former Member

Drop Down Box- Changing default value

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 16, 2009 at 11:19 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 22, 2009 at 11:20 AM

    Thanks

    Add comment
    10|10000 characters needed characters exceeded