<?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: Trigger Custom Button in ALV report using SALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731982#M2020481</link>
    <description>&lt;P&gt;Did you search?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Custom Button "set_screen_status" CL_SALV_TABLE site:sap.com&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229467-image.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2023 13:49:06 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-11-07T13:49:06Z</dc:date>
    <item>
      <title>Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731980#M2020479</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am writing a report and displaying it with the CL_SALV_Table objects. I have created a custom GUI status with two buttons on it and I need to know how to handle those actions when they are pressed.&lt;/P&gt;
  &lt;P&gt;Below is my code.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  lo_gr_alv-&amp;gt;set_screen_status( pfstatus      = 'ZCUSTOM'
                                report        = sy-repid
                                set_functions = lo_gr_alv-&amp;gt;c_functions_all
                                  ).
								  
								  
data: 
          l_text       type string,
          l_icon       type string.

  lo_gr_functions = lo_gr_alv-&amp;gt;get_functions( ).
  lo_gr_functions-&amp;gt;set_all( abap_true ).

    l_text = 'Generate'.
    l_icon = icon_complete.
    try.
      lo_gr_functions-&amp;gt;add_function(
        name     = 'TEST'
        icon     = l_icon
        text     = l_text
        tooltip  = l_text
        position = if_salv_c_function_position=&amp;gt;right_of_salv_functions ).
      catch cx_salv_existing cx_salv_wrong_call.
    endtry.
*****

  CASE sy-ucomm.
    WHEN 'TEST'.
      gt_rows = lr_selections-&amp;gt;get_selected_rows( ).
      LOOP AT gt_rows INTO DATA(gs_rows).
        READ TABLE gt_data INTO DATA(gs_index) INDEX gs_rows.
      ENDLOOP.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    WHEN OTHERS.
  ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Can someone please help me out with this?&lt;/P&gt;
  &lt;P&gt;How to handel the custom buttons&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 12:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731980#M2020479</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-11-07T12:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731981#M2020480</link>
      <description>&lt;P&gt;Can you post the code of your local method to handle events such as if_salv_events_functions~before_salv_function&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 13:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731981#M2020480</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-11-07T13:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731982#M2020481</link>
      <description>&lt;P&gt;Did you search?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Custom Button "set_screen_status" CL_SALV_TABLE site:sap.com&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229467-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 13:49:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731982#M2020481</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-11-07T13:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731983#M2020482</link>
      <description>&lt;P&gt;Yes  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; i check all these sites too. Did not found how to trigger event for the button.&lt;/P&gt;&lt;P&gt;I was able to add the custom button, but when i click on the button it does not get trigged.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 14:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731983#M2020482</guid>
      <dc:creator>alex_dsouza</dc:creator>
      <dc:date>2023-11-07T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731984#M2020483</link>
      <description>&lt;P&gt;Try this search to include the events (any user action) of CL_SALV_TABLE (method GET_EVENT):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Custom Button "set_screen_status" "get_event" CL_SALV_TABLE site:sap.com&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:40:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731984#M2020483</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-11-07T15:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Custom Button in ALV report using SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731985#M2020484</link>
      <description>&lt;P&gt;you need a local event listener class to handle SALV event, please check demo program  SALV_DEMO_TABLE_EVENTS in SE38 &lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 06:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-custom-button-in-alv-report-using-salv/m-p/12731985#M2020484</guid>
      <dc:creator>wilbur_peng</dc:creator>
      <dc:date>2023-11-21T06:50:32Z</dc:date>
    </item>
  </channel>
</rss>

