cancel
Showing results for 
Search instead for 
Did you mean: 

Delete button in ALV Table

Former Member
0 Kudos

Hi,

Does any one have a code sample for the ALV Table Delete button? When I hit the DELETE button the selected row gets deleted but how can I save this deletion to the database table so that when I do a refresh the deleted row does not re-appear.

Thanks. Kim

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Please note the issue is with Web Dynpro for ABAP.

Former Member
0 Kudos

Hi Kim,

In my openion you can create/add another button on your ALV Toolbar called "Save/Update" and then save the current entries into the database, by handling this action using user defined method and calling it in On_Function event handler .. hence in this way even when you refresh you will get the updated entries only.

Similarly you can have a cancel button as well to reload the previously loaded data.. or cancel the delete operation ..

Hope this helps.

Regards,

Anoop

Message was edited by:

Anoop Singh Saini

Former Member
0 Kudos

Hi Anoop,

Do you have a sample code which you can share with me for the DELETE of the entries from the database table.

Kim

Former Member
0 Kudos

Hi Kim,

i am sorry but I dont have a sample code for this .. but yes i can tell you a very simple logic here that should work fine ..

When the user clicks on Delete Entry call method say "Delete_entry" and within this you can write code based on this logic..

1) On_Action_Lead_Select should copy the content of that row to another context node say "Selected_Entry"

2) Search for this entry in your internal table/database that was bound to the ALVs context node(data source) and remove it using standard functions

3) again read the database/internal table data and bind it to the context node ..

Your changes will be reflected in your ALV..

I hope this helps and if it does please do award points

Also please close the thread if the issue gets resolved ..

Regards,

Anoop