‎2008 Jul 28 12:37 PM
Hi Everbody !
I created a quite nice editable ALV-Grid, that works almost fine.
The only problem I have and don't understand is the valditation in the PAI-Module of my dynpro, e.g. at the 'SAVE'-Command, if the 'ENTER'-Button wasn't pushed before.
In case of an error, the protocol shows up, but the false entry in alv is overwritten by the old content.
I call the method MY_ALV->CHECK_CHANGED_DATA.
What have i to do then?
Can anybody explain this to me?
Thanks a lot!
Sabrina
‎2008 Jul 28 12:41 PM
You need to Make use of the DATA_CHANGED event.
Check the sample program : BCALV_EDIT_03
It is for Verification of modified cells
‎2008 Jul 28 12:41 PM
You need to Make use of the DATA_CHANGED event.
Check the sample program : BCALV_EDIT_03
It is for Verification of modified cells
‎2008 Jul 28 1:20 PM
Hi!
Thanks for the immediate reply!
The Data-Changed-event is not the problem:
i registered it that way and implemented the handling inclusive error-protocoll.
CALL METHOD my_ALV_->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
the user has to push 'ENTER' to check the changed data on one rush.
But if the user only pushes 'SAVE' or something beyond the alv-toolbar, the pai-module will be processed.
So, i get the method alv->CHECK_CHANGED_DATA, to check the entries.
That works well, the protocoll is displayed, but the wrong entry in Alv (which is normally marked as error) is overwritten by the old, correct content.
‎2008 Jul 28 12:47 PM
In th USER_COMMAND subroutine of ur REUSE_ALV_GRID_DISpLAy FM
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
case p_ucomm.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
when 'SAVE'.
write ur code her