Application Development and Automation 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: 
Read only

Validation before delete rows in ALV OO

Former Member
0 Likes
751

Hi,

I have an editable ALV using OO Grid. Some columns are editable and others ones are not using field catalog. I want to validate the data before delete the current row and skip the deletion action if the validation fails. I try to stop the program using an event handler but the handler for the before_user_command event doesn't stop with the function code cl_gui_alv_grid=>mc_fc_loc_delete_row. How can I do to resolve this problem?

Regards,

Lisandro

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
502

Yes, I see you issue, you may want to consider removing these buttons from the toolbar using the exclude parameter of the SET_TABLE_FIRST_DISPLAY method. Then publish your own custom button for delete and then I'm pretty sure that the event before_user_command will be fired when you click this custom button.

Regards,

RIch Heilman

Hi,

I have an editable ALV using OO Grid. Some columns are editable and others ones are not using field catalog. I want to validate the data before delete the current row and skip the deletion action if the validation fails. I try to stop the program using an event handler but the handler for the before_user_command event doesn't stop with the function code cl_gui_alv_grid=>mc_fc_loc_delete_row. How can I do to resolve this problem?

Regards,

Lisandro

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
503

Yes, I see you issue, you may want to consider removing these buttons from the toolbar using the exclude parameter of the SET_TABLE_FIRST_DISPLAY method. Then publish your own custom button for delete and then I'm pretty sure that the event before_user_command will be fired when you click this custom button.

Regards,

RIch Heilman