<?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: ALV combox refresh description in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007555#M710660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maurizio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might consider doing it as per instuctions below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, after you call the method to display the ALV Grid (call method gt_grid-&amp;gt;&amp;lt;b&amp;gt;set_table_for_first_display&amp;lt;/b&amp;gt;), add the following code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* register ENTER to raise event DATA_CHANGED.
    call method gt_grid-&amp;gt;register_edit_event
      exporting
        i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_modified.

* handle the events of grid after user changes grid data
    set handler go_ref-&amp;gt;handle_data_changed for gt_grid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define and Implement the method handle_data_changed in your class definition followed by the method implementation as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class my_class definition.
 public section.
   methods: handle_data_changed for event data_changed of cl_gui_alv_grid
                                                  importing er_data_changed.
endclass&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  method handle_data_changed.
    data: ls_good type lvc_s_modi.

    data_changed = abap_true.
    error_in_data = space.

* loop over table MT_GOOD_CELLS to check all values that are changed by user
    loop at er_data_changed-&amp;gt;mt_good_cells into ls_good.
      case ls_good-fieldname.
        when 'COMBOX_ID'.
*         perform your_checks_here changing error_in_data.
*         Also Select/Move the description of the COMBOX_ID selected by user and 
*         pass it to the corresponding COMBOX_DESCRIPTION. Modify the main 
*         internal tab.that you pass to set_table_for_first_display
      endcase.
    endloop.

* display application log if an error has occured.
    if error_in_data = abap_true.
      call method er_data_changed-&amp;gt;display_protocol.
    else.
*  No error in data is found and your main internal table is ready with all 
*  descriptions already updated - now refresh the ALV Grid
    call method gt_grid-&amp;gt;refresh_table_display.
   endif.
  endmethod.                    "handle_data_changed&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Nov 2007 12:46:28 GMT</pubDate>
    <dc:creator>Sougata</dc:creator>
    <dc:date>2007-11-10T12:46:28Z</dc:date>
    <item>
      <title>ALV combox refresh description</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007554#M710659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;I've a table with 2 columns : first a combox with identifier ; second the identifier description. &lt;/P&gt;&lt;P&gt;I'd like if possible to refresh in automatic the identifier description at each pick up combox identifier. &lt;/P&gt;&lt;P&gt;Best regards. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Nov 2007 10:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007554#M710659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-10T10:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALV combox refresh description</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007555#M710660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maurizio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might consider doing it as per instuctions below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, after you call the method to display the ALV Grid (call method gt_grid-&amp;gt;&amp;lt;b&amp;gt;set_table_for_first_display&amp;lt;/b&amp;gt;), add the following code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* register ENTER to raise event DATA_CHANGED.
    call method gt_grid-&amp;gt;register_edit_event
      exporting
        i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_modified.

* handle the events of grid after user changes grid data
    set handler go_ref-&amp;gt;handle_data_changed for gt_grid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define and Implement the method handle_data_changed in your class definition followed by the method implementation as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class my_class definition.
 public section.
   methods: handle_data_changed for event data_changed of cl_gui_alv_grid
                                                  importing er_data_changed.
endclass&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  method handle_data_changed.
    data: ls_good type lvc_s_modi.

    data_changed = abap_true.
    error_in_data = space.

* loop over table MT_GOOD_CELLS to check all values that are changed by user
    loop at er_data_changed-&amp;gt;mt_good_cells into ls_good.
      case ls_good-fieldname.
        when 'COMBOX_ID'.
*         perform your_checks_here changing error_in_data.
*         Also Select/Move the description of the COMBOX_ID selected by user and 
*         pass it to the corresponding COMBOX_DESCRIPTION. Modify the main 
*         internal tab.that you pass to set_table_for_first_display
      endcase.
    endloop.

* display application log if an error has occured.
    if error_in_data = abap_true.
      call method er_data_changed-&amp;gt;display_protocol.
    else.
*  No error in data is found and your main internal table is ready with all 
*  descriptions already updated - now refresh the ALV Grid
    call method gt_grid-&amp;gt;refresh_table_display.
   endif.
  endmethod.                    "handle_data_changed&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Nov 2007 12:46:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007555#M710660</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-11-10T12:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV combox refresh description</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007556#M710661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've used REUSE_ALV_EVENTS_GET function con event DATA_CHANGED and corresponding Form for changing the description content of alv internal table(release 46c) but with the debugging the event not trigger.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Nov 2007 08:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007556#M710661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-11T08:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: ALV combox refresh description</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007557#M710662</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;I suggest you don't use those Function Modules for ALV display but use method SET_TABLE_FOR_FIRST_DISPLAY of class CL_GUI_ALV_GRID to output your ALV grid. The reason being that event CHECKED_DATA_CHANGED will work every time user changes any data on the grid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the code I've provided in my previous post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;I've spent a lot of time on your problem so please don't forget to reward points.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Nov 2007 10:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-combox-refresh-description/m-p/3007557#M710662</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-11-11T10:02:25Z</dc:date>
    </item>
  </channel>
</rss>

