<?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: Save data changes in OO ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284835#M153626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Newbie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data when update on the grid (Screen) is automatically updated to the internal table that you are using to display the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, all you need to do take the data from the internal table and update the Database, either by calling a BAPI, or directly if we are dealing with custom tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want to identify the changed rows, you will have to activate the events - DATA_CHANGED / DATA_CHANGE_FINISHED and take the changed data there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please reward the posts that help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Mar 2006 09:40:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-17T09:40:46Z</dc:date>
    <item>
      <title>Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284834#M153625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please tell how to save the data which is saved in OO ALV.&lt;/P&gt;&lt;P&gt;A simple sample code will be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points assured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 09:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284834#M153625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T09:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284835#M153626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Newbie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data when update on the grid (Screen) is automatically updated to the internal table that you are using to display the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, all you need to do take the data from the internal table and update the Database, either by calling a BAPI, or directly if we are dealing with custom tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want to identify the changed rows, you will have to activate the events - DATA_CHANGED / DATA_CHANGE_FINISHED and take the changed data there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please reward the posts that help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 09:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284835#M153626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T09:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284836#M153627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;You are right. The data is stored back into the internal table but only if the button in ALV toolbar is clicked, but not when any icon in application toolbar is clicked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any sample codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 09:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284836#M153627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T09:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284837#M153628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is when using FM.............&lt;/P&gt;&lt;P&gt;If u r using FM look at my example.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: LC_GLAY TYPE LVC_S_GLAY.&lt;/P&gt;&lt;P&gt;LC_GLAY-EDT_CLL_CB = 'X'.&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;------&lt;/P&gt;&lt;P&gt;gt_layout-zebra = 'X'.&lt;/P&gt;&lt;P&gt;gt_layout-detail_popup = 'X'.&lt;/P&gt;&lt;P&gt;gt_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_callback_program = i_repid&lt;/P&gt;&lt;P&gt;i_callback_user_command = 'USER_COMMAND1'&lt;/P&gt;&lt;P&gt;it_fieldcat = header&lt;/P&gt;&lt;P&gt;is_layout = gt_layout&lt;/P&gt;&lt;P&gt;i_callback_top_of_page = 'TOP-OF-PAGE1'&lt;/P&gt;&lt;P&gt;i_grid_title = text-h17&lt;/P&gt;&lt;P&gt;it_sort = gt_sort[]&lt;/P&gt;&lt;P&gt;i_default = 'X'&lt;/P&gt;&lt;P&gt;i_save = 'U'&lt;/P&gt;&lt;P&gt;is_variant = gt_variant&lt;/P&gt;&lt;P&gt;it_events = gt_events&lt;/P&gt;&lt;P&gt;I_GRID_SETTINGS = LC_GLAY&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;------&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form USER_COMMAND1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USER_COMMAND1 USING u_ucomm LIKE sy-ucomm&lt;/P&gt;&lt;P&gt;us_selfield TYPE slis_selfield."#EC CALLED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case u_ucomm.&lt;/P&gt;&lt;P&gt;when '&amp;amp;DATA_SAVE'.&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will come after the data was EDITTED and when SAVE was clicked by user in output scren.&lt;/P&gt;&lt;P&gt;Here now in the final internal table(ITAB) you can find the data changed in EDIT mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this you can do manipulation what ever you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;If this helps you reward with points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 10:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284837#M153628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T10:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284838#M153629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this information and kindly reward points by clikcing the star on the left of reply,if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ALV Grid has events &amp;#147;data_changed&amp;#148; and &amp;#147;data_changed_finished&amp;#148;. The former method is&lt;/P&gt;&lt;P&gt;triggered just after the change at an editable field is perceived. Here you can make checks for&lt;/P&gt;&lt;P&gt;the input. And the second event is triggered after the change is committed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	You can select the way how the control perceives data changes by using the method&lt;/P&gt;&lt;P&gt; &amp;#147;register_edit_event&amp;#148;. You have two choices: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i. After return key is pressed: To select this way, to the parameter &amp;#147;i_event_id&amp;#148; pass   	&amp;#147;cl_gui_alv_grid=&amp;gt;mc_evt_enter&amp;#148;. &lt;/P&gt;&lt;P&gt;  ii. After the field is modified and the cursor is moved to another field: For this, pass 	&amp;#147;cl_gui_alv_grid=&amp;gt;mc_evt_modifies&amp;#148; to the same parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	To make events controlling data changes be triggered, you must select either way by&lt;/P&gt;&lt;P&gt;calling this method. Otherwise, these events will not be triggered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	To control field data changes, ALV Grid uses an instance of the class&lt;/P&gt;&lt;P&gt;&amp;#147;CL_ALV_CHANGED_DATA_PROTOCOL&amp;#148; and passes this via the event &amp;#147;data_changed&amp;#148;.&lt;/P&gt;&lt;P&gt;Using methods of this class, you can get and modify cell values and produce error messages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 10:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284838#M153629</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-03-17T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284839#M153630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Newbie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the CHECK_CHANGED_DATA method of the grid as the first statement in the PAI of the screen. This should fix the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I guess you have registered the EDIT event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 10:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284839#M153630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T10:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284840#M153631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi KDeepak,&lt;/P&gt;&lt;P&gt;I'm using OO ALV.&lt;/P&gt;&lt;P&gt;The point is the data is not reflected in the internal table if the application toolbar button is pressed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 10:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284840#M153631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T10:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284841#M153632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at this PDF:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is the best way described... use the event data_changed there you will get the data which has been changed by the user...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 10:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284841#M153632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T10:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284842#M153633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul Miller,&lt;/P&gt;&lt;P&gt;have the same problem, and ack you whether your problem is fexed or not yet ?&lt;/P&gt;&lt;P&gt;Thnke &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 18:46:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284842#M153633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-02T18:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Save data changes in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284843#M153634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moutaa noureddine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcode to SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use method check_changed_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*----------------------------------------------------------------------*
* Module Pai INPUT                                                     *
*----------------------------------------------------------------------*
* PAI module                                                           *
*----------------------------------------------------------------------*
module pai input.
  save_ok = ok_code.
  clear ok_code.

  call method g_grid-&amp;gt;check_changed_data
    importing
      e_valid = v_valid.

  case save_ok.
    when 'EXIT'.
      perform f_exit_program.
    when 'CANC'.
      perform f_exit_program.
    when 'BACK'.
      perform f_exit_program.
    when 'SAVE'.
     if not v_valid is initial. "&amp;lt;&amp;lt;&amp;lt;
       perform f_save_data.
     endif.
    when 'EVEW'.
      perform f_set_fcode.
      perform f_save_data .
    when 'VADD'.
      perform f_f4_help_fieldname.
  endcase.
endmodule.                               " Pai INPUT

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create a new thread with detailed message of your query will get more answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 19:07:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-data-changes-in-oo-alv/m-p/1284843#M153634</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-02T19:07:32Z</dc:date>
    </item>
  </channel>
</rss>

