<?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: Undo functionality in ALV grid after refreshing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051997#M1809960</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maintain a table in your class ..&lt;/P&gt;&lt;P&gt;try to log the changes in to this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to have a field called current view in this table. which will be a check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if your table contains data like this..&lt;/P&gt;&lt;P&gt;123 abc aa12&lt;/P&gt;&lt;P&gt;234 def&amp;nbsp; bb34&lt;/P&gt;&lt;P&gt;456 xyz cc56&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and say user chages 2nd row 3rd field from bb34 to bb35.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you will add a log in your table as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row&amp;nbsp; column&amp;nbsp; initial&amp;nbsp; final&amp;nbsp;&amp;nbsp;&amp;nbsp; current chk&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb34&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if another row is added , add a line when ever there is an on change event.&lt;/P&gt;&lt;P&gt;row&amp;nbsp; column&amp;nbsp; initial&amp;nbsp; final&amp;nbsp;&amp;nbsp;&amp;nbsp; current chk&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb34&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp; bb36&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 789&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you can have undo button on the screen of alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the user presses undo button you have track of what has changed , and you can reverse the change using the log table you created...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you undo the changes . try to delete the lines that are after the line where chk is ne 'X'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or there might be a simple solution also , this is just a try...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2014 12:34:05 GMT</pubDate>
    <dc:creator>sriharsha_parayatham</dc:creator>
    <dc:date>2014-02-06T12:34:05Z</dc:date>
    <item>
      <title>Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051991#M1809954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm required to make an user friendlier sm30. Studying my options I decided to go for using an editable alv grid. After some cells are edited, others (non-editable) are filled with some content that depends on the value assigned to the edited cell. For that, I'm using the handle_data_changed and handle_data_changed_finished events. After I set proper values in these specific non-editable cells, I need to refresh the table in order to show the user the data. I'm doing this by calling refresh_table_display in the later event related method. The problem is that after refreshing the alv grid, I can't undo changes made in the table anymore. It seems like modification stack is stored in some alv grid class attribute, but erased after refreshing. How can I refresh alv grid display and still get the undo functionality to work (if that is possible)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 19:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051991#M1809954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-27T19:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051992#M1809955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paulo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might consider to store the begin state at another global variable in your program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This user friendlier SM30, is also going to insert/update/delete key fields? Then you might also consider a back up table with fields like: tablename, timestamp, ernam and a string, which contains the original data of the table they just altered in XML or a ZIPPED XML string or ZIPPED XML xstring, to be more sufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Best, Sander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 21:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051992#M1809955</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2014-01-27T21:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051993#M1809956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Sander, but I kind of worked around my problem. Some of the update I'm doing in the handle_data_changed method are being refreshed without the need for explicitly calling the refreshing method. Other cells are not beind updated on-the-fly, since I'm editing them in other event method (button_click for being more precise), but that won't be necessary for the requirements I have for now. Now I'm facing another problem. I need to store the user who may have done any modification to the table (for log purposes). Since the undo functionality is an undroppable requirement of the system, I have to keep in mind that undoing all changes made in a line of the table (the user can edit more than one cell in a row, in any order he wants) results in not associating such user to the edition of that line. Do you still think the best way to achieve this is by following your suggestion? Still, since there's no method related to the undoing functionality, how can I know that the event handle_data_changed was triggered by the undo toolbar button?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051993#M1809956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-28T15:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051994#M1809957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paolo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you don't put a commit work in the flow of the program, you don't have any undo trouble.&lt;/P&gt;&lt;P&gt;If you want to make sure / testing purposes etc., then I think my additional idea will be a good one, even if it is just for testing purposes at the first time only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 21:51:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051994#M1809957</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2014-01-28T21:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051995#M1809958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is that the alv triggers implicit commit works, this happens everytime a screen is processed, probably you need to use internal tables and then save everything your logs and your tables when a save button is pressed . &lt;/P&gt;&lt;P&gt;You should copy your initial tables and use them to regenarate your alv when a undo button is pressed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 23:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051995#M1809958</guid>
      <dc:creator>sacconipaolo</dc:creator>
      <dc:date>2014-01-28T23:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051996#M1809959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my problem by not refreshing the grid at every user interaction. I used a method from one the the parameters of handle_data_changed method to update the cells I want. I don't have any problem with saving either. Actually, if user hits the save button, I store the records into a transparent table and refresh the alv grid intentionally so that he can't undo changes made before saving. Nw I'm facing another related problem (it seems they are never over &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/536/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;). Search help is attached to some editable fields of the alv grid. If user writes values in the cells, the standard undo button works properly. However, if the value assigned to a cell is picked from f4 list, it breaks. That is, pressing undo button after picking a value from search help doesn't cause any change to the table. Is there a way to work around it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 15:53:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051996#M1809959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-05T15:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Undo functionality in ALV grid after refreshing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051997#M1809960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maintain a table in your class ..&lt;/P&gt;&lt;P&gt;try to log the changes in to this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to have a field called current view in this table. which will be a check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if your table contains data like this..&lt;/P&gt;&lt;P&gt;123 abc aa12&lt;/P&gt;&lt;P&gt;234 def&amp;nbsp; bb34&lt;/P&gt;&lt;P&gt;456 xyz cc56&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and say user chages 2nd row 3rd field from bb34 to bb35.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you will add a log in your table as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row&amp;nbsp; column&amp;nbsp; initial&amp;nbsp; final&amp;nbsp;&amp;nbsp;&amp;nbsp; current chk&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb34&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if another row is added , add a line when ever there is an on change event.&lt;/P&gt;&lt;P&gt;row&amp;nbsp; column&amp;nbsp; initial&amp;nbsp; final&amp;nbsp;&amp;nbsp;&amp;nbsp; current chk&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb34&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb35&amp;nbsp;&amp;nbsp; bb36&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 789&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you can have undo button on the screen of alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the user presses undo button you have track of what has changed , and you can reverse the change using the log table you created...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you undo the changes . try to delete the lines that are after the line where chk is ne 'X'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or there might be a simple solution also , this is just a try...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 12:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/undo-functionality-in-alv-grid-after-refreshing/m-p/10051997#M1809960</guid>
      <dc:creator>sriharsha_parayatham</dc:creator>
      <dc:date>2014-02-06T12:34:05Z</dc:date>
    </item>
  </channel>
</rss>

