<?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: Refresh ALV grid. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906010#M1328972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't search you will never find the useful content.&lt;/P&gt;&lt;P&gt; Try to Search in SCN before posting any question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the one which you are looking for...&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 08:26:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-24T08:26:35Z</dc:date>
    <item>
      <title>Refresh ALV grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906008#M1328970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, in my report programm, i want to insert a refresh button in the ALV, and when i press this, i want to execute the programm (or the perform get data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How do i insert this button ?&lt;/P&gt;&lt;P&gt;2.What code should i write for this button to execute the perform get data again ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZIN_TEST.

TABLES:
  EINA,
  EINE.

TYPES: BEGIN OF TS_EINAEINE,
  INFNR LIKE EINE-INFNR,
  LIFNR LIKE EINA-LIFNR,
 END OF TS_EINAEINE.

DATA:
  GT_EINAEINE TYPE TABLE OF TS_EINAEINE,
  GW_EINAEINE LIKE LINE OF GT_EINAEINE.

SELECT-OPTIONS S_LIFNR FOR EINA-LIFNR.

START-OF-SELECTION.

  PERFORM GET_DATA.

  PERFORM ALV_LIST.

FORM GET_DATA.
  SELECT

    EINA~LIFNR
    EINE~INFNR

    INTO CORRESPONDING FIELDS OF TABLE
      GT_EINAEINE

    FROM
      EINE

      INNER JOIN
        EINA
          ON
            EINA~INFNR = EINE~INFNR

            WHERE
              EINA~LIFNR IN S_LIFNR.
ENDFORM.
             " GET_DATA
FORM ALV_LIST.
*Objects
  DATA:

    GCL_ALV_GRID TYPE REF TO CL_GUI_ALV_GRID,
    GCL_TABLE TYPE REF TO CL_SALV_TABLE,
    GCL_FUNCTIONS TYPE REF TO CL_SALV_FUNCTIONS,
    GCL_DISPLAY TYPE REF TO CL_SALV_DISPLAY_SETTINGS,
    GCL_LAYOUT TYPE REF TO CL_SALV_LAYOUT,
    LV_KEY TYPE SALV_S_LAYOUT_KEY,
    GCL_ALV_COLUMN TYPE REF TO CL_SALV_COLUMN,
    GCL_ALV_COLUMNTAB TYPE REF TO CL_SALV_COLUMN_TABLE,
    GCL_ALV_COLUMNSTAB TYPE REF TO CL_SALV_COLUMNS_TABLE,
    LV_ALVX TYPE STRING,
    LX_ALV_MSG TYPE REF TO CX_SALV_MSG.

************************************************************************
      CL_SALV_TABLE=&amp;gt;FACTORY( IMPORTING R_SALV_TABLE = GCL_TABLE
                                CHANGING T_TABLE = GT_EINAEINE ).
************************************************************************

  GCL_FUNCTIONS = GCL_TABLE-&amp;gt;GET_FUNCTIONS( ).
  GCL_FUNCTIONS-&amp;gt;SET_ALL( ABAP_TRUE ).

*Display
  GCL_DISPLAY = GCL_TABLE-&amp;gt;GET_DISPLAY_SETTINGS( ).
  GCL_DISPLAY-&amp;gt;SET_STRIPED_PATTERN( CL_SALV_DISPLAY_SETTINGS=&amp;gt;TRUE ).

* display table
  GCL_TABLE-&amp;gt;DISPLAY( ).

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 08:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906008#M1328970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T08:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh ALV grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906009#M1328971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add the refresh button in the ALV toolbar using the method e.g SET HANDLER lcl_event_receiver_0100=&amp;gt;handle_toolbar      FOR gr_alvgrid_cont_100.&lt;/P&gt;&lt;P&gt;and then handle the same using set handler for user command based on ucomm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 08:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906009#M1328971</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2009-07-24T08:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh ALV grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906010#M1328972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't search you will never find the useful content.&lt;/P&gt;&lt;P&gt; Try to Search in SCN before posting any question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the one which you are looking for...&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 08:26:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-alv-grid/m-p/5906010#M1328972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T08:26:35Z</dc:date>
    </item>
  </channel>
</rss>

