Skip to Content
avatar image
Former Member

drop down box in a alv table

How to add a dropdown box in an alv table ?

this is what i did :

DATA : list_field TYPE REF TO cl_salv_wd_uie_dropdown_by_key.

CREATE OBJECT list_field

EXPORTING selected_key_fieldname = 'COLUMN_ID'.

ls_columns-r_column->set_cell_editor( list_field ).

but how to populate the dropdown box ??

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 28, 2007 at 08:33 AM

    Hi Mayya ,

    Please see Package <b>SALV_WD_DEMO</b>.In that Package you will find many demo examples whare ALV's are containing Drop down . It will help you.

    Cheers

    Parry B.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 28, 2007 at 08:24 AM

    Hi,

    if the field column_id is taken from some table field which may be attached to some domain ,then the values are taken from the value range or value table of domain or else u have to create a value range for that attribute and attach is to the attribute ,,, it will populate the drpdwnkey ,,,,,

    see the standard eg .WDR_TEST_INPUT for value set creation in the view V1 wdd0init method

    regards

    yashpal

    Message was edited by:

    Yashpal Gupta

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 28, 2007 at 08:25 AM

    Hi mayaa,

    DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .

    l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).

    DATA: l_value TYPE REF TO cl_salv_wd_config_table.

    l_value = l_ref_interfacecontroller->get_model( ).

    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,

    lr_column type ref to CL_SALV_WD_COLUMN.

    lr_dd_field TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.

    lr_column_settings ?= l_value.

    lr_column = lr_column_settings->get_column( 'PRICE' ).

    CREATE OBJECT lr_dd_field EXPORTING SELECTED_KEY_FIELDNAME= '<b><viewname.contextnode.attributename></b>'.

    lr_column->set_cell_editor( lr_dd_field ).

    Regards

    Abhimanyu L

    Message was edited by:

    Abhimanyu Lagishetti

    Message was edited by:

    Abhimanyu Lagishetti

    Message was edited by:

    Abhimanyu Lagishetti

    Message was edited by:

    Abhimanyu Lagishetti

    Add comment
    10|10000 characters needed characters exceeded