05-08-2007 3:33 PM
I guys, I have a problem validating data when I import from a file. What I'm doing is a kind of utility to load a table from a text file, via the ALV grid. I succeed in loading that file into my editable ALV grid (using OO), but loaded data doesn't goes thru the CHANGED_DATA process... Thanks for helping me.
05-08-2007 3:51 PM
The button with which you are uploading the data should be there in the application tool bar in order to trigger the event DATA_CHANGED.
This event trigger when PAI trigger. So make sure that your upload button is there in the application tool bar.
Thanks,
Raj
01-04-2024 1:27 PM
That's incorrect that "this event triggers when PAI trigger", it may trigger even without PAI, e.g. while the user moves out of an editable cell or press Enter. It depends how the code is done.
05-08-2007 4:10 PM
Yes, there is a button (not a standard but mine) that I use to import the file data into the grid Internal table. This button triggers a subroutine that parse the file, load the grid internal table, and call a REFRESH_TABLE_DISPLAY method of the grid.
But no data is added to the "change log" of the grid (parameters of the DATA_CHANGED event).
Thanks
05-08-2007 4:28 PM
You can get the UCOMM value in E_UCOMM of the event. AN dbased on that, compare the old ITAB and New ITAB values.
May be this has some extra process , but i think helpful.
Pass the Data to a temp. internal table. and compare with this table when ever there is a upload process triggers.
- Raj
05-08-2007 4:43 PM
But I want the grid to validate the data integrity (check table), and DATA_CHANGED Event subroutine to validate the rest (key duplication). I don't need to compare with a temp table, I just want to have the imported data added to the ER_DATA_CHANGED->MT_MOD_CELLS, ER_DATA_CHANGED->MT_DELETED_ROWS and
ER_DATA_CHANGED->MT_INSERTED_ROWS tables of the CL_ALV_CHANGED_DATA_PROTOCOL object like when you change data manually.
12-22-2023 6:31 AM
01-04-2024 1:12 PM
As far as I know, data_changed event of ALV Grid is only triggered when the ALV is editable and the user moves between cells or enters values.
If you edit the table content via code, the event is not triggered.