cancel
Showing results for 
Search instead for 
Did you mean: 

(ABAP) set lead selection to a row automatically

Former Member
0 Kudos

In table row, I have dropdown list and inputfield. What I want is that when user click on certain cell in the table to perform data input, the lead selection could change to the current line the cell belongs to automatically. Does anyone know how to achieve this goal? Your help would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Fred,

Set selectionChangeBehaviour property of Table UI element to "auto". See http://help.sap.com/saphelp_nw04s/helpdata/en/6e/ae0e422dfcdc2ce10000000a1550b0/content.htm

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

Thank you for your reply. Actually I have done that but I still didn't get the right lead selection. TO clarify the problem, I assume the first time I input something in the line A and then I move focus to some inputfield in line B. At this point the lead selection seems to remain in line A unless I click the block on the most left position of a line. Is it possible to change the lead selection automatically whenever I move the focus to another line in a table?

Former Member
0 Kudos

I found the solution. There is a dropdown box in the table. I just put the following code in the onSelect event.



temp = wdevent->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
index = temp->get_index( ).

     node_parent = wd_context->GET_CHILD_NODE( name = 'parent').
     elem_parent = node_post->move_to( parent ).

It sets the lead selection to the "parent" element according to the index returned by event parameter.

Message was edited by: Fred Zhou

Answers (0)