cancel
Showing results for 
Search instead for 
Did you mean: 

Save changed data in editable ALV

Former Member
0 Kudos

Hi experts,

I have a problem with an editable ALV. I get data out of a table and show it with my web dynpro application in an alv. Now I made the alv editablke, so that I can change the content of each cell in the alv in the web browser. But how will this changed data be saved? I want that it will be changed after ENTER or clicking a save button. I have a button, but all I tried yet brought no success.

Which code has to be in which method? Have I to do something eith the context. How can I reach that the changed content is also changed in the table, so that after reload the web dynpro application, the changed content is shown?

It would be nice if you had an answer with code examples and the exact place where to put it in, because I am very new to ABAP and WD4A.

Thanks a lot!

Best Regards

Ingmar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thx a lot!

Former Member
0 Kudos

If you look on the following lokn, there is the tutorial "Editing ALV in Web Dynpr for ABAP".

There is described how to save the data. But in the implementation of On_data_check on page 8 and 9 the code detail for saving the data to database is missing, because the flight model shall not be changed.

Would the missing code be the solution? What is the code?

Thanks!!!

Best Regards Ingmar

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814...

Former Member
0 Kudos

Hi,

Yeah I think the missing code is the problem. You can do as below:

The Save button will not be available by default. You need to add the button explicitly and specify a function code 'SAVE' to it. You also need to implement an event handler for the on_function event of the ALV. In the event handler, check if R_PARAM->ID = 'SAVE'.

In the event handler, you simply read the context and call your API to save the data. The API would ideally contain insert/modify statements that would update the tables.

Regards

Nithya