<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: capturing data changes in alv using classes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445108#M1552178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_user_command.&lt;/P&gt;&lt;P&gt;  CASE e_ucomm.&lt;/P&gt;&lt;P&gt; WHEN 'UPDATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             CALL METHOD r_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows INTO wa_rows.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the first container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD r_grid1-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows1.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows1 INTO wa_rows1.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the second container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD r_grid1-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows2.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows2 INTO wa_rows2.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the third container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;Now we can create three container and three different grid class object but we are using same method.&lt;/P&gt;&lt;P&gt;UPDATE buttton is common to all three containers.&lt;/P&gt;&lt;P&gt;But one important point when u change the records in container we must select the rows then only selected rows r come to the internal table otherwise it is not come.&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_1'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container2&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_2'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container3&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_3'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid1&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container2&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid2&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container3&lt;/P&gt;&lt;P&gt;NOW WE CAN CALL THE METHOD.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid2.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thing it should be possible.But u must remeber u must select the records when u modifie in three containersBUT UPDATE button is common to all three containers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MURALII&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Nov 2010 10:40:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-26T10:40:57Z</dc:date>
    <item>
      <title>capturing data changes in alv using classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445106#M1552176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently am working on alv report using classes..,In this report am displaying 3 grids in the output in 3 different containers(cl_gui_custom_container)...,Am able to handle the data changes done in the grid  at the run time using event  data_changed ...,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the requirement + problem is ...if i do the changes in all the grids ,,,,,and if i click(hotspot event) on any of the rows/records in any of the grids ...,, I need to be able to capture all the data changes done in all the other grids....,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:-&lt;/P&gt;&lt;P&gt;if i modify some records in all the 3 grids ,,, and if I click any of the row in any of the grid at a time,,, all the changes done in all the grids should be captured.....( in simple words one click all changes )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using data_changed event....., am only able to capture the changes of the grid on which i clicked ( ie.hotspot event) but not the changes which i have done on other grids.....Pls. help me out with the possibilities&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope am clear..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2010 16:18:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445106#M1552176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-25T16:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: capturing data changes in alv using classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445107#M1552177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you are in event handler for &lt;EM&gt;data_change&lt;/EM&gt; event of one grid use method &lt;EM&gt;check_changed_data&lt;/EM&gt; for all the other grids. It should fire their &lt;EM&gt;data_change&lt;/EM&gt; events too and eventually you should raise all their handlers thereby catching the changes in all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you do the same in the other handlers (to check changes for other grids but itself).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2010 20:10:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445107#M1552177</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-11-25T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: capturing data changes in alv using classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445108#M1552178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_user_command.&lt;/P&gt;&lt;P&gt;  CASE e_ucomm.&lt;/P&gt;&lt;P&gt; WHEN 'UPDATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             CALL METHOD r_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows INTO wa_rows.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the first container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD r_grid1-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows1.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows1 INTO wa_rows1.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the second container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD r_grid1-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows2.&lt;/P&gt;&lt;P&gt; LOOP AT it_rows2 INTO wa_rows2.&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;modify the third container data&lt;/STRONG&gt;***********&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;Now we can create three container and three different grid class object but we are using same method.&lt;/P&gt;&lt;P&gt;UPDATE buttton is common to all three containers.&lt;/P&gt;&lt;P&gt;But one important point when u change the records in container we must select the rows then only selected rows r come to the internal table otherwise it is not come.&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_1'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container2&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_2'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_container3&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_3'&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid1&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container2&lt;/P&gt;&lt;P&gt; CREATE OBJECT r_grid2&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container3&lt;/P&gt;&lt;P&gt;NOW WE CAN CALL THE METHOD.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid2.&lt;/P&gt;&lt;P&gt;CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thing it should be possible.But u must remeber u must select the records when u modifie in three containersBUT UPDATE button is common to all three containers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MURALII&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 10:40:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-data-changes-in-alv-using-classes/m-p/7445108#M1552178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-26T10:40:57Z</dc:date>
    </item>
  </channel>
</rss>

