<?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 Refresh button on ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102110#M736136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Throw some light please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2007 07:24:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-22T07:24:44Z</dc:date>
    <item>
      <title>Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102105#M736131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am displaying an Editable ALV (using OO ABAP)&lt;/P&gt;&lt;P&gt;Befor I display I handled soe validations.&lt;/P&gt;&lt;P&gt;Issue:&lt;/P&gt;&lt;P&gt;When the user changes any data on the editable alv, and press refresh button the toolbar, these validations should trigger again.&lt;/P&gt;&lt;P&gt;How can I change this standard functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 12:59:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102105#M736131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102106#M736132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zwsalvgrid.&lt;/P&gt;&lt;P&gt;TYPE-POOLS: icon.&lt;/P&gt;&lt;P&gt;TABLES: zc6_employee.&lt;/P&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION DEFERRED.&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;P&gt;DATA: BEGIN OF i_employee OCCURS 0.&lt;/P&gt;&lt;P&gt;      INCLUDE STRUCTURE zc6_employee.&lt;/P&gt;&lt;P&gt;DATA: traffic_light TYPE c.&lt;/P&gt;&lt;P&gt;DATA: line_color(4) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: END OF i_employee.&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;P&gt;DATA: ok_code LIKE sy-ucomm,&lt;/P&gt;&lt;P&gt;      wa_employee LIKE LINE OF i_employee,&lt;/P&gt;&lt;P&gt;      gs_layout TYPE lvc_s_layo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: grid1 TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;      i_custom_container TYPE REF TO cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      o_event_receiver TYPE REF TO lcl_event_receiver.&lt;/P&gt;&lt;P&gt;DATA: wa_change LIKE zc6_employee.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data for storing information about selected rows in the grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gi_index_rows TYPE lvc_t_row,     " Internal table&lt;/P&gt;&lt;P&gt;g_selected_row LIKE lvc_s_row.    " Information about 1 row&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;C L A S S E S&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;CLASS lcl_event_receiver DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS:&lt;/P&gt;&lt;P&gt;    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;    e_object e_interactive,&lt;/P&gt;&lt;P&gt;    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;    IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;ENDCLASS.&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;CLASS lcl_event_receiver IMPLEMENTATION&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;CLASS lcl_event_receiver IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; METHOD handle_toolbar.        " Event handler method for event toolbar.&lt;/P&gt;&lt;P&gt;    CONSTANTS:                  " Constants for button type.&lt;/P&gt;&lt;P&gt;     c_button_normal TYPE i VALUE 0,&lt;/P&gt;&lt;P&gt;     c_separator TYPE i VALUE 3.&lt;/P&gt;&lt;P&gt;    DATA:&lt;/P&gt;&lt;P&gt;     ls_toolbar TYPE stb_button.&lt;/P&gt;&lt;P&gt;    MOVE c_separator TO ls_toolbar-butn_type.&lt;/P&gt;&lt;P&gt;    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append a new button that to the toolbar. Use E_OBJECT of&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This class has one attribute MT_TOOLBAR which is of table type&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TTB_BUTTON. The structure is STB_BUTTON&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR ls_toolbar.&lt;/P&gt;&lt;P&gt;    MOVE 'CHANGE' TO ls_toolbar-function.&lt;/P&gt;&lt;P&gt;    MOVE icon_change TO ls_toolbar-icon.&lt;/P&gt;&lt;P&gt;    MOVE 'Change Details' TO ls_toolbar-quickinfo.&lt;/P&gt;&lt;P&gt;    MOVE 'Change' TO ls_toolbar-text.&lt;/P&gt;&lt;P&gt;    MOVE ' ' TO ls_toolbar-disabled.&lt;/P&gt;&lt;P&gt;    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD handle_user_command." Handleown functions defined in thetoolbar&lt;/P&gt;&lt;P&gt;    CASE e_ucomm.&lt;/P&gt;&lt;P&gt;      WHEN 'CHANGE'.&lt;/P&gt;&lt;P&gt;        PERFORM change_details.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&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;S T A R T - O F - S E L E C T I O N.&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;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  SELECT-OPTIONS: s_empid FOR zc6_employee-s1empid.&lt;/P&gt;&lt;P&gt;  SELECT * FROM zc6_employee INTO CORRESPONDING FIELDS OF TABLE&lt;/P&gt;&lt;P&gt;  i_employee WHERE s1empid IN s_empid.&lt;/P&gt;&lt;P&gt;  CALL SCREEN '100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;   v_layout TYPE disvariant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF i_custom_container IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create objects for container and ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CREATE OBJECT i_custom_container&lt;/P&gt;&lt;P&gt;    EXPORTING container_name  ='ALV_CONTAINER'.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT grid1&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    i_parent = i_custom_container.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create object for event_receiver class&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and set handlers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CREATE OBJECT o_event_receiver.&lt;/P&gt;&lt;P&gt;    SET HANDLER o_event_receiver-&amp;gt;handle_user_command FOR grid1.&lt;/P&gt;&lt;P&gt;    SET HANDLER o_event_receiver-&amp;gt;handle_toolbar FOR grid1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Layout (Variant) for ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    v_layout-report = sy-repid. "Layout fo report&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;Setup the grid layout using a variable of structure lvc_s_layo&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set grid title&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    gs_layout-grid_title = 'ALV Grid Display-Employee Details'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection mode B- Single row without buttons.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This is the default mode&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    gs_layout-sel_mode = 'B'.&lt;/P&gt;&lt;P&gt;    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.&lt;/P&gt;&lt;P&gt;    gs_layout-info_fname = 'LINE_COLOR'.&lt;/P&gt;&lt;P&gt;    LOOP AT i_employee INTO wa_employee.&lt;/P&gt;&lt;P&gt;      wa_employee-traffic_light = '3'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Value of color field:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;C = Color, 6=Color 1=Intesified on, 0: Inverse display off&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      MODIFY i_employee FROM wa_employee.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Grid setup for first display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING i_structure_name = 'ZC6_EMPLOYEE'&lt;/P&gt;&lt;P&gt;    is_variant = v_layout&lt;/P&gt;&lt;P&gt;    i_save = 'A'&lt;/P&gt;&lt;P&gt;    is_layout = gs_layout&lt;/P&gt;&lt;P&gt;    CHANGING it_outtab = i_employee[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;End of grid setup&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE. " STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0200 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0200 INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;      WHEN'SAVE'.&lt;/P&gt;&lt;P&gt;      PERFORM save_changes.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_0200 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form change_details&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;Reads the contents of the selected row in the grid, and transfers&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the data to screen 200, where it can be changed and saved.&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 change_details.&lt;/P&gt;&lt;P&gt;  REFRESH gi_index_rows.&lt;/P&gt;&lt;P&gt;  CLEAR g_selected_row.&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    l_lines TYPE i.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE gi_index_rows LINES l_lines.&lt;/P&gt;&lt;P&gt;  IF l_lines &amp;gt; 0.&lt;/P&gt;&lt;P&gt;    CALL METHOD grid1-&amp;gt;set_selected_rows&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;   it_index_rows = gi_index_rows.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read index of selected rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD grid1-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;  et_index_rows = gi_index_rows.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if any row are selected at all. If not&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table gi_index_rows will be empty&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DESCRIBE TABLE gi_index_rows LINES l_lines.&lt;/P&gt;&lt;P&gt;  IF l_lines = 0.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              textline1 = 'You must choose a line'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read indexes of selected rows. In this example only one&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;row can be selected as we are using gs_layout-sel_mode = 'B',&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;so it is only ncessary to read the first entry in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table gi_index_rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT gi_index_rows INTO g_selected_row.&lt;/P&gt;&lt;P&gt;    IF sy-tabix = 1.&lt;/P&gt;&lt;P&gt;      READ TABLE i_employee INDEX g_selected_row-index INTO wa_employee.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer data from the selected row to screen 200 and show&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;screen 200&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR wa_change.&lt;/P&gt;&lt;P&gt;  MOVE wa_employee TO wa_change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL SCREEN 200 STARTING AT 5 5.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form save_changes&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;P&gt;FORM save_changes.&lt;/P&gt;&lt;P&gt;  MOVE  wa_change TO wa_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MODIFY zc6_employee FROM wa_change.&lt;/P&gt;&lt;P&gt;  MOVE  wa_change TO wa_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update grid table , traffic light field and color field.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_employee-traffic_light = '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;C = Color, 6=Color 1=Intesified on, 0=Inverse display off&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_employee-line_color = 'C610'.&lt;/P&gt;&lt;P&gt;  MODIFY i_employee INDEX g_selected_row-index FROM wa_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Refresh grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD grid1-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_cfw=&amp;gt;flush.&lt;/P&gt;&lt;P&gt;  LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;ENDFORM. " save_changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreenivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 13:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102106#M736132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T13:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102107#M736133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreenivas &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not creating any extra button on tool bar.&lt;/P&gt;&lt;P&gt;I want to handle the existing refresh button on standard alv tool bar.&lt;/P&gt;&lt;P&gt;Is this possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 06:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102107#M736133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T06:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102108#M736134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok first you need to copy the gui status STANDARD from the function group SALV into your program. This is the standard gui status used for the toolbar in your program, next modify it and add a button to the toolbar for your refresh. Then in you program, you need to tell it to use this status instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_salv_table=&amp;gt;factory( IMPORTING r_salv_table = gr_table&lt;/P&gt;&lt;P&gt;CHANGING t_table = ispfli ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you are telling the alv object to use this gui status instead&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_table-&amp;gt;set_screen_status(&lt;/P&gt;&lt;P&gt;pfstatus = 'STANDARD'&lt;/P&gt;&lt;P&gt;report = sy-repid&lt;/P&gt;&lt;P&gt;set_functions = gr_table-&amp;gt;c_functions_all ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, you will have your button on the toolbar, but you will still need to handle it.&lt;/P&gt;&lt;P&gt;Check program SALV_DEMO_TABLE_FUNCTIONS to see what the procedures are to handle your custom button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, here is a tutorial which will walk you thru the entire process. With screenshots. Hope it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/alv%20object%20model%20-%20simple%202d%20table%20-%20event%20handling.pdf" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/alv%20object%20model%20-%20simple%202d%20table%20-%20event%20handling.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if usefull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 06:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102108#M736134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T06:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102109#M736135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Naresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was really a helpful tutorial.&lt;/P&gt;&lt;P&gt;But the problem is &lt;/P&gt;&lt;P&gt;I am having all my declarations based on cl_gui_alv_grid. and used set_first_display for my alv display.&lt;/P&gt;&lt;P&gt;can u tell me how i can modify this for my requiremnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 07:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102109#M736135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102110#M736136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Throw some light please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 07:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102110#M736136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T07:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handle Refresh button on ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102111#M736137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved on my own&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 07:10:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-refresh-button-on-alv/m-p/3102111#M736137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T07:10:05Z</dc:date>
    </item>
  </channel>
</rss>

