Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2009 at 11:20 AM

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.