Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Check_changed_data method on editable ALV Grid ( class cl_gui_alv_grid)

Hi guys,

I use the following method (register_edit_event) in the PBO soon after first display of an editable ALV grid to register enter as an event to do validations on fields like qty. If user enters some character like 'abc' for qty and hits enter on keyboard, ALV grid pop's up a standard message ( I haven't coded for this.Since I use DDIC structure in field catalog, the Std. ALV program takes care of it. ). THis takes care of the validation before I click on save.

call method alv_grid->register_edit_event

exporting

i_event_id = cl_gui_alv_grid=>mc_evt_enter.

This works fine. But I want this validation to run when I also click the SAVE button of the screen. Is it possible to run this standard validation in my PAI event eg. SAVE ? I thought I will be, by calling the method check_changed_data in my PAI event. But this is doing nothing. Does this method conflict with register_edit_event or something ? So , basically what I am looking for is to trigger the event or call the method which does the same work as the "check" button on ALV grid.

Any advice or tips or sample code is greatly appreciated.

Thanks,

Shareen

Tags:
replied

Hi,

You can use this

CALL METHOD g_grid->register_edit_event

EXPORTING

i_event_id = cl_gui_alv_grid=>mc_evt_modified.

in the PERFORM where you PERFORM validations.

In the SAVE PAI event call

CALL METHOD g_grid->check_changed_data

Ps: Reward points if helpful.

Regards,

Wenceslaus.

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question