cancel
Showing results for 
Search instead for 
Did you mean: 

multiple selection without using ctrl key

Former Member
0 Kudos

hello folks,

can someone suggest me how to enable multiple selection of rows in an alv table without using ctrl key.

Thanks,

Sean

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sean,

I think you will have to add the following coding.

You will have to declare an attribute ALV_CONFIG_TABLE of type CL_SALV_WD_CONFIG_TABLE explictly.

  • get ALV component

DATA:

lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.

lr_salv_wd_table = wd_this->wd_cpifc_alv( ).

wd_this->alv_config_table = lr_salv_wd_table->get_model( ).

DATA:

lr_table_settings TYPE REF TO if_salv_wd_table_settings.

lr_table_settings ?= wd_this->alv_config_table.

lr_table_settings->set_selection_mode( CL_WD_TABLE=>E_SELECTION_MODE-MULTI ).

I think this snippet should close your problem.

Regards

Raja Sekhar

Former Member
0 Kudos

Hi Sean,

If that doesnt work, then try with CL_WD_TABLE=>E_SELECTION_MODE-MULTI_NO_LEAD as a parameter.

Regards

Raja sekhar

Former Member
0 Kudos

Hi Raja Sekhar,

The problem when i use CL_WD_TABLE=>E_SELECTION_MODE-MULTI

is that the first row of the alv table is automatically selected and to select other rows i still need to press the control key.

and the problem with the statement

CL_WD_TABLE=>E_SELECTION_MODE-MULTI_NO_LEAD

is that no rows are defaultly selected but to select multiple rows i still need to hold the ctrl key.

can you please suggest me something where i can select multiple rows without holding the ctrl key.

appreciate your thought.

Thanks,

Sean

Edited by: sean paul on Jan 8, 2008 11:06 PM

Former Member
0 Kudos

Hi Sean,

I got your requirement.

Looks like, we too will have a similar requirement...So I will work out and send you the solution once I workaround.

Regards

Raja Sekhar