cancel
Showing results for 
Search instead for 
Did you mean: 

Tab press/mouse left click switching between fields of a table

matteo_montalto
Contributor
0 Kudos

Hello all @sdn forums,

I have a custom web dynpro which shows a table made up of different input fields.

I want to trigger a method when a user changes some of the values of the input table. This is actually a prerequisite for a further step in the process.

An example; if field A of the row is set at zero, then set at zero field B too.

This is not a problem actually if the user changes a value and press ENTER, because there's an ON_EVENT_ON_ENTER in which I trigger my method.

But... the user could modify multiple values before pressing the enter key. Referring to the previous example, the user could set field A to zero in rows 1, 2, 3 , 4 ... and THEN press ENTER. This obviously invalidate the correct behaviour I stated above.

So... I'm going to ask you if there's a way to associate a check/method related to the fact that the user has selected a different input field of the input table. If that's the case, I could easily solve the above described problem simply triggering the ON_EVENT_ON_ENTER at that move.

Could you please give us suggestions/hints on how to manage this situation?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

sahai
Contributor
0 Kudos

hi,

try creating an event handler "ON_DATA_CHECK".....i hope this will solve your problem as this event will trigger as the data displayed is changing....

thanks and regards,

sahai.s

matteo_montalto
Contributor
0 Kudos

hello sahai,

could you please provide further elements and information about this event handler?

Thanks in advance.

EDIT: I've searched the forum for ON_DATA_CHECK, seems it's related to ALV tables. I forgot to mention that my table is not an ALV.

Edited by: Matteo Montalto on Jan 13, 2011 2:01 PM

sahai
Contributor
0 Kudos

hi Matteo,

actualy i think you have to save if the user makes changes in more that one column rite?......and since you ar using table ui component in you case.......check thta to display the data in the table you must be binding the table with an internal table is'nt?

so now the data is displayed in the table which you have made editable...now user makes some some changes and presses enter (in your case)....in that you can again read the node by which you binded the table when you will check it in debugger after reading you will find that the changed vaues are reflected....now try this and inform..becase if you get those values reflected then you can simply use compare statement along with modify statement to update the database and solve your problem.

thanks,

sahai.s

gill367
Active Contributor
0 Kudos

you can get the all newly entered values in the context node which is bound to the table ui .

compare these newly entered values with the old values which you can save at the time of binding the node.

or you can use two context node of same type and put older values in one compare it with the values after the change in the

onenter eventhandler.

thanks

sarbjeet singh

Answers (0)