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: 

deleting a row in alv when a check box is clicked

Former Member
0 Kudos

have an alv report with check box and standard button DELETE.

if i click a check box , and press the delete button,the corresponding rows has to be deleted.

i have created a check box by

WA_FIELDCAT-CHECKBOX = 'X'.

WA_FIELDCAT-INPUT = 'X'

6 REPLIES 6

Former Member
0 Kudos

Hi,

Make sure you call the method CHECK_CHANGED_DATA OF THE GRID, in the PAI of your screen so that the values from the screen are transferred to the internal table.

Once that is done, in the code of the button all you have to do is

DELETE ITAB WHERE CHECKBOX_FIELDNAME = 'X'.

Regards,

Ravi

Note : Please close the thread if this solves your problem

0 Kudos

i am useing reuse_alv_list_display

former_member181962
Active Contributor
0 Kudos

REfer the program:

BCALV_EDIT_04

Regards,

Ravi

0 Kudos

i am useing 4.5b,the program is not i the library

0 Kudos

Charles,

As far as I remember, EDIT functionality in a ALV was introduced in 4.6C. So, is your CHECK BOX in the EDIT mode in the first place?

If yes, then all you have to do is to execute the DELETE command as given above.

Regards,

Ravi

Note : Please mark the helpful answers

former_member188685
Active Contributor
0 Kudos

Hi,

check where the checkbox is checked nd delete the records from itab.

some thing like this./

<b>delete itab where checkbox  = 'X'.</b>

regards

vijay