cancel
Showing results for 
Search instead for 
Did you mean: 

drop down box in a alv table

Former Member
0 Kudos

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 ??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

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

Yashpal
Active Contributor
0 Kudos

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