cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically changing selection mode in component SALV_WD_TABLE

matt
Active Contributor
0 Kudos

I want to programmatically change the selection mode in component SALV_WD_TABLE. I've embedded the component in one of my own components. Under one circumstance, I want multiple selection to be possible, under another, I only want single selection capability.

I've set the context in my component, which is mapped to the SALV_WD_TABLE usage component, so that the relevant node has selection cardinality 0..n. The approach I'd like to take, is to programmatically set the selection cardinality to 0..n in the first scenario, and 0..1 in the second. But I can't figure out how to do that, or even if it's possible!

Is it possible to set the selection cardinality programmatically - if so, how? If it isn't, is there another way I can achieve the same functionality?

Thanks

matt

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can do that.

See IF_SALV_WD_TABLE_SETTINGS method set_selection_mode method.

get the config table like this

lr_table_settings ?= wd_this->alv_config_table.

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

use constants from

CL_WD_TABLE=>E_SELECTION_MODE-AUTO