Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: How to save only changed data of ALV in a local table ?

$
0
0

ok than

 

class lcl_event_receiver definition.

     methods:

* Handle Data Changed
     handle_data_changed
     for event data_changed of cl_gui_alv_grid
     importing er_data_changed,

endclass.                    "lcl_event DEFINITION


class lcl_event_receiver implementation.

     method handle_data_changed.

          data: ls_good type lvc_s_modi.

          loop at er_data_changed->mt_good_cells into ls_good.


               read table gt_table into gs_table index ls_good-index. "is your changed row in ALV


                ls_good-fieldname "is your changed field


               if ls_good-fieldname eq 'MATNR'.

                    gs_table-matnr " is your changed field old value.

               endif. "i couldn't find a dynamic solution for old value

               "if you do not have so many columns in alv you can use this solution


                ls_good-value "is your changed field new value


               append these values to your changed field table.


               modify gt_table from gs_table index ls_good-index.           

          endloop.

          call method g_alvgrid->refresh_table_display.
     endmethod.

endclass.


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>