cancel
Showing results for 
Search instead for 
Did you mean: 

UI table index on enter data

Former Member
0 Kudos

I have UI Table (NOT Alv). The table columns are UI InputField.

I need to capture the table index when User enters data into the table cell which is on InputField Enter event.

Is making the cell row selected the only way to capture the table index?

Or if there another way?

Thanks,

Tatyana

Accepted Solutions (1)

Accepted Solutions (1)

Madhu2004
Active Contributor
0 Kudos

HI,

In the ONevent action handler method you will have WDEVENT has importing parameter.

data : cont_element type ref to if_d_context_element.
data lv_index type I.

cont_element = wd_event->get_context_element( ).

lv_index  =  cont_element->get_index( )."this will retuen the index

Regards,

MAdhu

Answers (4)

Answers (4)

Former Member
0 Kudos

I was too quick.

Madhu, the answer goes to you. Because you were more specific pointing out on wdevent.

Former Member
0 Kudos

Chris, thanks a lot!

It works now.

Tatyana

ChrisPaine
Active Contributor
0 Kudos

Hello,

all actions triggered in a table cell report the element that is bound to the table cell editor.

so there is no need to have lead selection set - you can query from the element returned in the action which index of the node it is using the IF_WD_CONTEXT_ELEMENT->GET_INDEX method.

Former Member
0 Kudos

Hi Tatyana,

So what is the purpose of capturing the table index? what if use don't press enter but tab to move to next row?

You can do it either by selecting rows from table UI or loop through all elements and check whether the attribute has value in it.

Thanks,

Duy