cancel
Showing results for 
Search instead for 
Did you mean: 

Lead Selection not changing

roger_beach
Participant
0 Kudos

I am struggling with a lead selection issue.  Note below, I have a table with 4 rows, I clock on row 2 to make it the lead selection.

But in debug, row 4 is still the lead selection and row two is just "selected".  Everything is set to auto as far as selection method and whatnot.  Why doesn't the lead selection change when I click on a different row?

Accepted Solutions (0)

Answers (2)

Answers (2)

chengalarayulu
Active Contributor
0 Kudos

Roger,

enable singleton property along with leadSelection if it is child node(which you are reading).

hope this can help.

Former Member
0 Kudos

Could you please tell at what point of debugging did you take the screenshot for the node.

I mean, I would like to know the steps you followed to debug and check the node values.

roger_beach
Participant
0 Kudos

We have a method for deleting a row which was not deleting the selected row but rather always deleting the last row.  I placed an external breakpoint within that method.

When we attempt to get the index via lead selection it is always the last row rather than the one that has been selected.  This can be seen in the debugger by using the web dynpro tool.

If you look at the right hand side of your debug window there is a button to replace tool:

Once you click on Replace Tool you can choose the Web Dynpro tool:

Within this tool is where I was checking node/element values.

Former Member
0 Kudos

I am aware of the ways to check the node values.

What i meant was, the steps you followed on your application.

Like you first selected row 2 , clicked the editable input field in row 4 and pressed Delete Button or vice versa.

One more thing.

The first column in the table... Is it the master column ( hierarchy ) or a table popin. If the table has something like a hierarchy tree, definitely lead selection would be something different than you are expecting

roger_beach
Participant
0 Kudos

My apologies, thank you for your reply.

The first column is a popin.

As far as the steps, the editable input field in row 4 was already active, then I clicked row 2 to make it lead selection.

Although that doesn't seem to matter as when I open from a save draft and immediately click on a different row the lead selection is always the last row.

Selection settings for node is 1:1

Selection mode for table is auto.

I would note that we have another table that appears to be set up the exact same way including the pop in and it behaves as you would expect.

For some reason, this one doesn't seem to recognize when the user changes the lead selection.

roger_beach
Participant
0 Kudos

Developed a work around although I'm puzzled why the lead selection isn't getting set correctly.

We are getting selected elements minus lead selection and deleting that index:

  lt_set = lo_nd_z9002->get_selected_elements( abap_false ).

  LOOP AT lt_set INTO ls_set.

    CALL METHOD ls_set->get_index

      RECEIVING

        my_index = lv_index.    " My Index

  ENDLOOP.

DELETE it_tab INDEX lv_index.

Former Member
0 Kudos

It seems to be a weird issue.

Could you try

Selection Cardinality: 0:1

Cardinality: 0:1

Initialize Lead selection: Yes.