<?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: CL_SALV_TABLE dynamic refresh in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393904#M9847</link>
    <description>&lt;P&gt;Yes, I know...Although I  have developed for a long time in normal ABAP,  I am starting to develop in ABAP OO... give me some time &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2016 08:02:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-12-15T08:02:51Z</dc:date>
    <item>
      <title>CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393900#M9843</link>
      <description>&lt;P&gt;Hi community. &lt;/P&gt;&lt;P&gt;I am doing a ALV report using SALV model. &lt;/P&gt;&lt;P&gt;Initially is static, but when clicking a toolbar button, a heavy process is executed by each record, and I would like to show the result of the process for each record by refreshing the ALV. &lt;/P&gt;&lt;P&gt;I thought it was as easy as &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;go_alv-&amp;gt;refresh( refresh_mode = if_salv_c_refresh=&amp;gt;full ). &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but not... &lt;/P&gt;&lt;P&gt;Let me show you the code. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_handle_events IMPLEMENTATION.
   METHOD on_user_command.
     PERFORM f_on_user_command USING e_salv_function.
   ENDMETHOD.                    "on_user_commmand
 ENDCLASS.                    "lcl_handle_events IMPLEMENTATION &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_alv.
         INCLUDE STRUCTURE zbcgrc_actions.
TYPES:   icon_action TYPE icon_d,
          icon     TYPE icon_d,
       END OF ty_alv.
DATA:  gt_alv TYPE TABLE OF ty_alv,
       gs_alv TYPE ty_alv.
 DATA: go_alv TYPE REF TO cl_salv_table,
       go_events TYPE REF TO lcl_handle_events.

FORM f_display_alv .
   TRY.
       cl_salv_table=&amp;gt;factory(
       IMPORTING
         r_salv_table = go_alv
       CHANGING
         t_table      = gt_alv ).
     CATCH cx_salv_msg.                                 "#EC NO_HANDLER
   ENDTRY.
   PERFORM f_set_columns_alv.
   PERFORM f_set_events_alv.
   go_alv-&amp;gt;display( ).
 ENDFORM.                    " F_DISPLAY_ALV

FORM f_set_columns_alv.
   DATA: lo_cols TYPE REF TO cl_salv_columns_table,
         lo_col  TYPE REF TO cl_salv_column_table.
   lo_cols = go_alv-&amp;gt;get_columns( ).
   TRY.
       lo_col ?= lo_cols-&amp;gt;get_column( 'ICON' ).
       lo_col-&amp;gt;set_icon( if_salv_c_bool_sap=&amp;gt;true ).
     CATCH cx_salv_not_found.                           "#EC NO_HANDLER
   ENDTRY.
   TRY.
       lo_col ?= lo_cols-&amp;gt;get_column( 'ICON_ACTION' ).
       lo_col-&amp;gt;set_icon( if_salv_c_bool_sap=&amp;gt;true ).
     CATCH cx_salv_not_found.                           "#EC NO_HANDLER
   ENDTRY.
 ENDFORM.                    "f_set_columns
FORM f_set_events_alv .
   DATA: lo_events TYPE REF TO cl_salv_events_table.
   lo_events = go_alv-&amp;gt;get_event( ).
   CREATE OBJECT go_events.
   SET HANDLER go_events-&amp;gt;on_user_command FOR lo_events.
 ENDFORM.                    " F_SET_EVENTS_ALV_ROLE
FORM f_on_user_command  USING    p_function.
   CASE p_function.
     WHEN '&amp;amp;EXEC'.
       PERFORM f_execute.
   ENDCASE.
 ENDFORM.                    " F_ON_USER_COMMAND
 FORM f_execute .
      FIELD-SYMBOLS: &amp;lt;gs_alv&amp;gt; TYPE ty_alv.
   LOOP AT gt_alv ASSIGNING &amp;lt;gs_alv&amp;gt;.
        PERFORM f_proccess_action CHANGING &amp;lt;gs_alv&amp;gt;.
"in this process &amp;lt;gs_alv&amp;gt;-icon is modified.
     IF go_alv IS BOUND. 
"it should refresh alv with the icon_modified... but not...
       go_alv-&amp;gt;refresh( refresh_mode = if_salv_c_refresh=&amp;gt;full ).
     ENDIF.
   ENDLOOP.
 ENDFORM.                    " F_EXECUTE &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do I miss something? &lt;/P&gt;&lt;P&gt;Thank you all&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393900#M9843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-14T17:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393901#M9844</link>
      <description>&lt;P&gt;From the code that you attached, I can't quite tell... Just make sure that your go_alv-&amp;gt;display( ) is re-executed before the screen is displayed every time in the PBO&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 19:52:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393901#M9844</guid>
      <dc:creator>raghug</dc:creator>
      <dc:date>2016-12-14T19:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393902#M9845</link>
      <description>&lt;P&gt;What a pity PERFORM had not been forbidden in ABAP OO... &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 20:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393902#M9845</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-12-14T20:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393903#M9846</link>
      <description>&lt;P&gt;Set a break-point at &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF go_alv IS BOUND.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also consider moving the refresh out of the LOOP.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Raymond&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 06:52:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393903#M9846</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2016-12-15T06:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393904#M9847</link>
      <description>&lt;P&gt;Yes, I know...Although I  have developed for a long time in normal ABAP,  I am starting to develop in ABAP OO... give me some time &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 08:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393904#M9847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-15T08:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393905#M9848</link>
      <description>&lt;P&gt;The first thing I did was to set up a break-point there. and Yes, it enters, and I learned about the parameter refresh_mode when I see it inside the cl_salv_table class. :D.&lt;/P&gt;&lt;P&gt;I have to re-think, re-build the logic of the program.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 08:06:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393905#M9848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-15T08:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393906#M9849</link>
      <description>&lt;P&gt;There is no PBO nor dynpro. The unique "user-commad" it is the click on a button at user toolbar, that is handled by the event...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 08:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393906#M9849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-15T08:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: CL_SALV_TABLE dynamic refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393907#M9850</link>
      <description>&lt;P&gt;Then try adding it to your f_execute at the end, outside the loop&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 13:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-salv-table-dynamic-refresh/m-p/393907#M9850</guid>
      <dc:creator>raghug</dc:creator>
      <dc:date>2016-12-15T13:06:23Z</dc:date>
    </item>
  </channel>
</rss>

