‎2010 Aug 24 12:41 PM
Hello,
I do have 2 ALVs (class CL_GUI_ALV_GRID) in a Splitter-Control.
Both ALVs do have registered the event DATA_CHANGED in seperate handler methods.
If there is a change in first ALV(line insertion with values), there will be inserted a new line with values in the second ALV. After handling the event at first ALV, I call CHECK_CHANGED_DATA of the second ALV and REFRESH_TABLE_DISPLAY of the second ALV. I would expect that the call of CHECK_CHANGED_DATA would trigger the event DATA_CHANGED, but it does not trigger the event DATA_CHANGED of the second ALV.
The problem is maybe that the input at the data is not made by the user(UI).
What could I do to trigger this event and check the new data at second ALV?
Yours Joerg
‎2010 Aug 25 7:37 AM
Hi,
I think after handling the event at first ALV, you are calling CHECK_CHANGED_DATA of the second ALV.
Try to call the CHECK_CHANGED_DATA of the first ALV and take changes into internal table of second ALV.
If changes are done try to refresh the second ALV with new values of internal table.
Regards,
Rajesh
‎2010 Aug 25 7:47 AM
Hi Rajesh,
thanks for answer.
But I am already doing your described procedure.
I call the CHECK_CHANGED_DATA of the first ALV and take changes into internal table of second ALV. After changes are done I refresh the second ALV by the method REFRESH_TABLE_DISPLAY.
Any other idea?
Yours Joerg
‎2010 Aug 25 8:02 AM
Hi,
Are you getting blank space in the screen output of second ALV?
Debug the code while refreshing the second ALV.
Regards,
Rajesh
‎2010 Aug 25 9:51 AM
Hi Rajesh,
yes the new lines are showed and inserted, that works fine.
But I do have checkings in my handler method for CHECK_CHANGED_DATA. And I want to use the message showing of the CL_ALV_CHANGED_DATA_PROTOCOL.
You mean debugging the SAP standard?
Regards
Joerg
‎2010 Aug 25 10:29 AM
Hello,
did you call method register_edit_event after grid creation?
Also this might help you:
http://www.sapalv.net/2009/08/sap-alv-tutorial-8-handling-data-change/
Regards,
Pedro
‎2010 Aug 25 12:14 PM
Hi Pedro,
yes I called the method register_edit_event after grid creation with cl_gui_alv_grid=>mc_evt_enter.
I also tried cl_gui_alv_grid=>mc_evt_modified. But no reaction of the handler.
Thanks for the link, but it doesn't helps.
Regards
Joerg
‎2010 Aug 27 10:14 AM
Hi all,
any other ideas, I did not resolved my problem.
Regards
Joerg
‎2010 Aug 27 10:29 AM
Hello ,
yeah thats correct , but in your case what you can do is
g_grid1(first alv) >CHECK_CHANGED_DATA( Importing E_VALID = l_Valid )>in the implementation method of this ..update global variable g_second = 'X' in order to refresh ALV2.
g_grid1(first alv) -->Refresh_table_display( ).
if g_second = 'X'.
g_grid2-->SET_TABLE_FOR_FIRST_DISPLAY. so it will refresh the second alv contents.
endif.
regards
Prabhu
‎2011 May 13 6:20 AM
Hi all,
This post is really old but I'm facing a similar issue.
When I trigger the check_changed_data it's triggering the data_changed_finished instead of the data_changed...
Any suggestion?.
Regards,
Eric