cancel
Showing results for 
Search instead for 
Did you mean: 

Leadselection in ALV not visible

Former Member
0 Kudos

I have a simple test application. A context node is defined as 0...1 and I have bound it with a table and an ALV (SALV_WD_TABLE).

In WDDOINIT of COMPONENTCONTROLLE I fill the context and set the leadselection (node->set_lead_selection( index = 1 ).

The simple table mark the row as the selected (yellow), but the row of ALV don't marked.

How I can set the lead_selection at ALV?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Try with method set_lead_selection_index :

node->set_lead_selection_index( index = 3 ).

And change the cardinality of node binded to table/Alv with 0..n or 1..n

Former Member
0 Kudos

Hello,

I test:

node->set_lead_selection_index( index = 3 )

and

lo_value->if_salv_wd_table_settings~set_selection_mode( value = cl_wd_table=>e_selection_mode-SINGLE ).

but it doesn't work. The row in ALV doesn't marked.

INITILAIZE LEAD SELECTION set the first. But I like that an other row.

Who has an other idea.

Best Regards

Maik sturm

Former Member
0 Kudos

Hi,

Initialize lead selection for that node should be checked,

and for that node you can set the lead selection index as 3 (if you have 3 or more rows in the ALV)...

then the selection mode is set to SINGLE.

have you changed the cardinality or not....

Don't you want to have the 1row as selected by default....

If you have the MAPPING then use the UPDATE mapping and test it again...

Regards,

Lekha.

Edited by: Lekha on Nov 4, 2009 5:27 PM

Former Member
0 Kudos

The OSS-Note 1137854 solve the problem with the lead_selection. But, the content of note isn't exactly. The end user don't select a line but the developer.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You need do any settings for ALV table.

Does the ALV table contain an entries.

If it has entries the lead selection will come automatically..

Regards,

Chaitanya Priya

Former Member
0 Kudos

Hi,

which settings I need for ALV table?

The ALV has entries (two rows ) and I set a leadselection(), but it don't visible.

Thanks

Maik Sturm

Former Member
0 Kudos

Hi,

For that Node to which ALV is bound is the INTILIZATIONLEADSELCTION is checked or not.

check the if_salv_wd_table_settings~set_selection_mode method to set the lead selection

DATA: lo_value type ref to cl_salv_wd_config_table.
    CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
      EXPORTING
        value = cl_wd_table=>e_selection_mode-SINGLE.

Cardinality should be set to 0:N or 1:N for TABLE entries otherwise only one row gets displayed.

Regards,

Lekha.

Edited by: Lekha on Nov 4, 2009 4:32 PM

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

In the Context in the node Properties is the INITILAIZE LEAD SELECTION checked..

Regards,

Priya