cancel
Showing results for 
Search instead for 
Did you mean: 

generate an event when text in a text field is modified

Former Member
0 Kudos

Hi All,

I have an ALV table. In this ALV table, I have few editable text field columns. Now my question is, I want to generate an event as soon as the user modifies the value of those text fields so that i can SAVE these values to my table. How can i do this?

Thanks & Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Create an event handler method and assign it ON_DATA_CHECK event of the alv. Write rthe code accordingly. This method will be triggerred when any change is made in the alv. Refer thsi online help [ON_DATA_CHECK|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/content.htm].

I hope it helps.

Regards

Arjun

Answers (3)

Answers (3)

uday_gubbala2
Active Contributor
0 Kudos

Hi Ravi,

Is your issue resolved? If yes then please do the needful & close this thread.

Regards,

Uday

uday_gubbala2
Active Contributor
0 Kudos

Hi Ravi,

You dont have to create any new event for this. You can take advantage of an ALV's existing event: ON_DATA_CHECK. But you will have to associate the checking of your TextEdit's content with some event like pressing enter after modifying the TextEdit or may be pressing on a pushbutton.

You would basically be just taking advantage of the ALV's ON_DATA_CHECK event which gets triggered when any data changes within the ALV.

So suppose you have a button and upon pressing this you want to look out for any data changes then within the action handler of this button call the data_check method of the ALV component. This method checks if any data has changed in the ALV and then triggers the ON_DATA_CHECK event if it finds that something has changed in the ALV. You can then create an event handler method for the ON_DATA_CHECK event which would get triggered whenever the system detects any changes in the TextEdit's.

Regards,

Uday

Former Member
0 Kudos

Hi,

go thru this link

thnks