Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Update database through alv grid using handle data changed finished

0 Kudos
430

Hello,

I have displayed an ALV grid having three columns: LIFNR, NAME and ADRESS.

I want to add a row or update an existing row and the modification should be done also for the database.

does anyone know how to update the database through alv report using handle data changed and handle data changed finished events?

Thank you,

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos
376

You'd better have a user experience the same as for any other SAP screen so that the user is comfortable with your application, i.e. better have a SAVE button to save the changes to the database. Consequently, you don't need DATA_CHANGED for saving to the database.

NB: I guess you know how to update the database with UPDATE, INSERT, MODIFY, DELETE, COMMIT WORK, ROLLBACK WORK (which is not related to ALV).

0 Kudos
376

Thank you Sandra for your answer, Yes I know how to update database with update,...

But I am trying to get used with events and I want to know how it can be done with Handle_data_changed and Handle_data_changed_finished.

Sandra_Rossi
Active Contributor
0 Kudos
376

I guess you want to know how the events DATA_CHANGED and DATA_CHANGED_FINISHED work.

It's not related to updating the database of course, so I won't answer anything about that.

About these events:

  1. to use these events, you must first register them. You can choose between activating them on TAB or ENTER without changing the values, or only when the values are changed.
  2. the same as for any event in OOP, you need to register your own methods to be triggered when these events are raised.
  3. in these methods you will receive the parameters about the data which has been changed.

There are lots of questions, answers, blog posts about them. What did you try, what did you not understand?

Good luck!