<?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: handle_data_changed - triggered in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576728#M260343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eyal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me clear up the first part of my answer.&lt;/P&gt;&lt;P&gt;If you look at cl_gui_alv_grid &amp;gt;&amp;gt; events tabs, you will see a data_changed event with 4 parameters - those 3 flags and a instance of cl_alv_changed_data_protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your event handler class you would be responding to these events with a method. Now the method probably just calls a form somewhere in your program - and it probably only passes the cl_alv_changed_data_protocol, and not the flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the flags are definitely there in the event you just may not be using them in your form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have a look at the public atrribute MT_DELTA_CELLS_INSERTED&lt;/P&gt;&lt;P&gt;of cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure but this may keep a global record of changed data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want the data_changed event to be triggered when they manually enter data, but &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; when they use F4 - this will be very hard. You probably have to extend class cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try using set_registered_events( ). You'll have to hunt the the attributes of cl_gui_alv_grid to find a likely event to turn off tho.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phillip Manning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Oct 2006 23:24:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-16T23:24:14Z</dc:date>
    <item>
      <title>handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576722#M260337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;I am using ALV display - classes (cont , grid etc...)&lt;/P&gt;&lt;P&gt;I am displaying an editable internal table &lt;/P&gt;&lt;P&gt;whenever i push the little button on the MATNR field - the one that display the sample options of MATNR...&lt;/P&gt;&lt;P&gt;its triggers the handle_data_changed event.&lt;/P&gt;&lt;P&gt;and for so the table "mt_inserted_rows" is deleted after this first touch of the screen.&lt;/P&gt;&lt;P&gt;how can i avoid this without using the sy-ucomm...&lt;/P&gt;&lt;P&gt;btw : to trigger the event manually i used the sy-ucomm.&lt;/P&gt;&lt;P&gt;thanks ahead &lt;/P&gt;&lt;P&gt;specially to those who understood the problem.&lt;/P&gt;&lt;P&gt;Eyal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 17:08:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576722#M260337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T17:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576723#M260338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eyal &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be honest I do no really understand your problem, particularly what you mean by &amp;lt;i&amp;gt;"...the little button on the MATNR field - the one that display the sample options of MATNR&amp;lt;/i&amp;gt;...".&lt;/P&gt;&lt;P&gt;However, I do understand how event handling of the grid control works:&lt;/P&gt;&lt;P&gt;- You have an editable grid control. The user has changed some data.&lt;/P&gt;&lt;P&gt;- When the user executes a function that will lead to PAI (e.g. ENTER, SAVE) then you must call the instance method CHECK_DATA_CHANGED otherwise the changes on the ALV list will not be transported to your itab in the ABAP program (nor will event DATA_CHANGED be raised)&lt;/P&gt;&lt;P&gt;- Since the user changed some data CHECK_DATA_CHANGED will raise event DATA_CHANGED. Now the changes are transported to the itab in ABAP.&lt;/P&gt;&lt;P&gt;- If, for example, you want to validate the changed data then you have to define an event handler (e.g. HANDLE_DATA_CHANGED).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the logic of event handling for editable grid controls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 19:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576723#M260338</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-10-04T19:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576724#M260339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Uwa.&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;The little button on the MATNR field - its F4 func - when I push this button a window opens and I can choose which MATNR I want to use.&lt;/P&gt;&lt;P&gt;I'll try to describe the scenario:&lt;/P&gt;&lt;P&gt;- I want to enter a new record in my DB-table - insert line (which have the MATNR field).&lt;/P&gt;&lt;P&gt;- I want to choose which MATNR will be in this new line &lt;/P&gt;&lt;P&gt;- I push the little button (F4) &lt;/P&gt;&lt;P&gt;- When I do so it triggered the "Data_Changed" &lt;/P&gt;&lt;P&gt;- For now, the it_table does not change&lt;/P&gt;&lt;P&gt;- But, the system table which handled by the Data_Changed trigger - "mt_inserted_rows" - does change and now holds the new line's number and its value - NULL or ' '.&lt;/P&gt;&lt;P&gt;- After I insert all the other values I push the 'Save' button and its triggers the PAI which triggers the "Handle_Data_Change".&lt;/P&gt;&lt;P&gt;- But now, the "mt_inserted_rows" is now 'initial' and I all of its data is lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this table in order not to search the new it_table for its new record. (and insert it to my DB_table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is more clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks ahead&lt;/P&gt;&lt;P&gt;with regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eyal Cohen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Oct 2006 08:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576724#M260339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-15T08:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576725#M260340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Populate the it_table in F4 event&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Oct 2006 08:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576725#M260340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-15T08:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576726#M260341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy Eyal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you use the parameters that come through with the 'data_changed' event? It will set the flags (E_ONF4, E_ONF4_BEFORE, E_ONF4_AFTER). Is this what you mean, ie how to tell when this event was called by F4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I think 'so what?' if it disappears from mt_inserted_rows because afterwards it will be in mt_modified_rows instead. If you need to validate the whole row at once, then add a validation field/flag to your display table and flag it as technical in the fieldcat (fcat-tech = 'X'). You can manually set this flag when a row is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 01:21:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576726#M260341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T01:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576727#M260342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello phillip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try to clear up my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just don't want that the event - "data change" will be activate when i push the F4 button on some fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't understand the first part of your answer - " It will set the flags (E_ONF4, E_ONF4_BEFORE, E_ONF4_AFTER). "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the second part of your answer is good and probably work - it is not an elegant solution &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks neway and with best regards.&lt;/P&gt;&lt;P&gt;Eyal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 08:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576727#M260342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T08:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: handle_data_changed - triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576728#M260343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eyal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me clear up the first part of my answer.&lt;/P&gt;&lt;P&gt;If you look at cl_gui_alv_grid &amp;gt;&amp;gt; events tabs, you will see a data_changed event with 4 parameters - those 3 flags and a instance of cl_alv_changed_data_protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your event handler class you would be responding to these events with a method. Now the method probably just calls a form somewhere in your program - and it probably only passes the cl_alv_changed_data_protocol, and not the flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the flags are definitely there in the event you just may not be using them in your form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have a look at the public atrribute MT_DELTA_CELLS_INSERTED&lt;/P&gt;&lt;P&gt;of cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure but this may keep a global record of changed data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want the data_changed event to be triggered when they manually enter data, but &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; when they use F4 - this will be very hard. You probably have to extend class cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try using set_registered_events( ). You'll have to hunt the the attributes of cl_gui_alv_grid to find a likely event to turn off tho.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phillip Manning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 23:24:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-data-changed-triggered/m-p/1576728#M260343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T23:24:14Z</dc:date>
    </item>
  </channel>
</rss>

