04-03-2006 4:37 PM
Hello,
I have a internal table that I display with the class CL_GUI_ALV_GRID.
This list is editable. After editing the user can do a syntax check. All new entered rows or
Modified cell values will be checked using the object ER_DATA_CHANGED of method handle_data_changed. I check some logic and if there is something wrong I add an entry to the protocol by call method er_data_changed->add_protocol_entry etc.
Now I want to add a new feature to my list.
The user should be able to upload a .csv file from his presentation server.
Well The upload works fine. I get all the uploaded data in my ALV. But and this is my problem: I am not able any more to make a syntax check, because none of the uploaded data is in the object ER_DATA_CHANGED.
Do you have any idea how to solve this? I searched for a method to add inserted rows manually .
Kind regards,
Tobias
04-03-2006 4:50 PM
Hi,
if you do upload the data,and alv grid is editable then you should have some thing in ER_DATA_CHANGED.
and is the Full grid is editable.
Regards
Vijay
04-03-2006 5:13 PM
Hello,
I have a editable Grid.
I do the following things in PAI (to upload data).
a) Refresh Internal table (that i show with ALV)
b) CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
c) cl_gui_frontend_services=>gui_upload
d) Put all new rows in internal table that I show with ALV
e) call GRID->REFRESH_TABLE_DISPLAY
Now I have all uploaded rows in my ALV, but there is no entry in er_data_changed
Due to this I am not able to do a syntax check.
Greetings,
Tobias
04-03-2006 5:30 PM
Tobias,
I don't think the event is going to fire in this manner.
When you update the data in the front end (GRID), and then hit Enter, before updating the internal table, the event will fire.
What you are doing is the other way round - updating the table and then updating the front end using REFRESH.
Regards,
Ravi
Note : Please mark the helpful answers
04-03-2006 5:37 PM
Hi Tobias,
you can try calling this method inside your PAI <b>CHECK_CHANGED_DATA</b>
and try to register event <b>EVT_MODIFIED</b> after your set_table_display method .
Regards
vijay
04-03-2006 5:48 PM
Vijay,
How would the event fire, if the data is changed in the internal table and NOT on the GRID?
Regards,
Ravi
04-03-2006 5:51 PM
Hi,
if he upload the new data to alv grid during run time , then the grid data will be changed in that case the event will be fired or not.
Regards
vijay
04-03-2006 6:05 PM
Vijay,
I think he is uploading the data into the internal table and then refreshing the grid. Look at the steps he has described.
a) Refresh Internal table (that i show with ALV)
b) CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
c) cl_gui_frontend_services=>gui_upload
d) Put all new rows in internal table that I show with ALV
e) call GRID->REFRESH_TABLE_DISPLAY
Regards,
Ravi
04-03-2006 6:08 PM
ok,yep he need to change the steps.
then only that event can trigger.
Regards
vijay
04-04-2006 4:15 AM
Tobias,
Now that we know, why is the event not firing, are you going to change the flow of the program?
Regards,
Ravi
04-04-2006 7:44 AM
Hello,
first of all thanks a lot for all the answers.
@Vijay,
i still don't understand how you would change the steps in detail....
i tried the following:
a)REGISTER_EDIT_EVENT
b)CHECK_CHANGED_DATA
c)REFRESH_TABLE_DISPLAY
or
a)CHECK_CHANGED_DATA
b)REFRESH_TABLE_DISPLAY
c)REGISTER_EDIT_EVENT
...etc.
but it still doesnt work.
to be honest i thought that the event check_changed_data will be triggered automatically when i press the "syntax check-button" on the toolbar....
and i also don't understand why i need to register the register_edit_event in this case....
may you please explain more in detail where you would change which steps..?
Kind regards,
Tobias
04-04-2006 7:50 AM
Tobias,
As the data is updated in the internal table and then to the grid, none of the events are going to fire.
I don't think you can import data directly on to the GRID without updating the table. There is only a export option of data from the GRID.
You will have to somehow force the user to check the data.
Quick thought :
Add a column, display as check box (Editable). Ask the user to check that box if all the data of that row is right, else ask him to modify the data and then mark the check box.
Then you take the data and consider only those rows where the check box is marked.
Regards,
Ravi
Note : please mark the helpful answers
06-25-2009 10:59 AM
Hi Tobias,
I am facing the exact same problem. Did you find a solution?
Best regards
Rasmus