cancel
Showing results for 
Search instead for 
Did you mean: 

Split Rows and Store the selection

Former Member
0 Kudos

Hi all,

I have a table with a column where there is a numeric data and I developed a code that, if the user insert a number > 1 and he clicks on enter, he writes this row as many times as the number inserted.This table has not a ID that indentify the row, and if I select one or more rows and I click on Enter on numeric data I see that I lost my selection. I think because when I add new rows at my table, I make again the bind of the table, but... there is a method for to store my precedent selection (for ex. the rows that I don't want to split)?

Tks a lot.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Use this code to get the index of row in which Enter is pressed.

DATA: lv_index TYPE i.

lo_el_cn_node = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).

lv_index = lo_el_cn_node->get_index( ).

Now you can store this index and later after you are done with binding of more rows to the table, Set the lead selection index to lv_index.

lo_nd->set_lead_selection_index( lv_index ).

I hope it would help.

Former Member
0 Kudos

Ok! I have solved, tks a lot!