cancel
Showing results for 
Search instead for 
Did you mean: 

ALV customize button Event

prathamesh_gandhi
Participant
0 Kudos

Hi ALL,

I have ALV, i have added a customize button "Delete" in it, i want to delete the selected line from ALV as well from Z table.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Refer this article: [Generating Self-Defined Functions for ALV in Web Dynpro for ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true]

You can also refer this [Thread|].

I hope it helps.

prathamesh_gandhi
Participant
0 Kudos

Hi ALL,

Can i write code in event of std "Delete Row" button of ALV???? where and how can i get that event???

Thanks In Advance

saravanan_narayanan
Active Contributor
0 Kudos

Hello Prathamesh,

there are two events provided for the standard functions ( ON_STD_FUNCTION_BEFO and ON_STD_FUNCTION_AFTE )

you need to do the following

1. in your component create event handler methods for the above mentioned event

2. in the FUNCTION_BERFORE event handler, check for the event id and if its delete then from the context node retrieve lead selected element information and store it in member variables

3. in the FUNCTION_AFTER event handler, check for the event id and if its delete then delete the record that is stored in the member variables from the database

you can delete records from database in step 2 itself. but doing it in step3 is a good practice.

BR, Saravanan