Skip to Content
avatar image
Former Member

How can I delete a value in a drop-down box in ABAP

Hello,

How can I delete a value in a drop-down box in ABAP ? The selectedKey name ist direct_sub

Regards Kerim

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 02, 2015 at 01:01 PM

    Don't add these value while making the display list by puting validation.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 03, 2015 at 11:52 AM

    Hi,

    How are you populating the values in Dropdown...are you using domain level values or are you populating the values manually?

    You can also populate the required values manually by using below code.

    data lo_nd_node type ref to if_Wd_context_node.

    data lo_nd_node_info type ref to if_wd_context_node_info.

    data lt_values type wdr_context_values

    data lt_valueset type wdr_context_attr_value_list.

    data lw_value type wdr_context_attr_value.

    lo_nd_node      = wd_context->get_child_node( name = 'NODE' ).

    lo_nd_node_info = lo_nd_node->get_node_info( ).

    lw_value-value = '1'.  "as per your requirement

    lw_value-text  = 'Directly subordinate employees'.

    append lw_value to lt_valueset.

    clear lw_value.

    lw_value-value = '2'.  "as per your requirement

    lw_value-text  = 'All employees'.

    append lw_value to lt_valueset.

    clear lw_value.

    lo_nd_node_info->set_attribute_value_set( name      = '<attribute_name>'

                                             value_set = lt_value_set ).

    Go through the Web Dynpro component DEMO_UIEL_STD_SELECTION for a working example of DropDownByKey & DropDownByIndex

    Hope this helps you.

    Thanks

    KH

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 05, 2015 at 04:13 AM

    Hi Kerim,

    There are two options to bring the text into DD , either from domain value or direct load into drop down, kindly find out which option is used here.

    • If it is domain value you needs to removed from SE11 Domain
    • If it is direct data load check the place where you are loading the data & remove the unnecessary fields before binding.

    - Gowtham

    Add comment
    10|10000 characters needed characters exceeded