<?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: Problem with ALV Toolbar in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-alv-toolbar/m-p/3536428#M850884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
*To add new functional buttons to the ALV toolbar
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive .
ENDCLASS.

CLASS lcl_event_handler IMPLEMENTATION .
*Handle Toolbar
METHOD handle_toolbar.
PERFORM handle_toolbar USING e_object e_interactive .
ENDMETHOD .
ENDCLASS.

FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
CLEAR ls_toolbar.
MOVE 'PER' TO ls_toolbar-function. "#EC NOTEXT
MOVE icon_display_text TO ls_toolbar-icon.
MOVE 'Passenger Info'(201) TO ls_toolbar-quickinfo.
MOVE 'Passenger Info'(201) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
CLEAR ls_toolbar.
MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT
MOVE 2 TO ls_toolbar-butn_type.
MOVE icon_calculation TO ls_toolbar-icon.
MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.
MOVE ' ' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
ENDFORM .

DATA gr_event_handler TYPE REF TO lcl_event_handler .
.. ..
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler-&amp;gt;handle_user_command FOR gr_alvgrid .
SET HANDLER gr_event_handler-&amp;gt;handle_toolbar FOR gr_alvgrid .

call gr_alvgrid-&amp;gt;set_table_for_first_display....

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2008 13:13:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-07T13:13:57Z</dc:date>
    <item>
      <title>Problem with ALV Toolbar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-alv-toolbar/m-p/3536427#M850883</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 have added a button on my editable ALV Toolbar -delete as I wanted to put my own functionality for it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this button is not getting displayed on my toolbar for the first time in the ALV . This ALV gets displayed on the double click of some other ALV .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I double click on a particular row for the first item on my main ALV , this button does not get displayed .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I double click it for the second item delete button gets displayed on the toolbar .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please could someone help me out with this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sushanth H.S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 11:05:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-alv-toolbar/m-p/3536427#M850883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T11:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with ALV Toolbar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-alv-toolbar/m-p/3536428#M850884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
*To add new functional buttons to the ALV toolbar
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive .
ENDCLASS.

CLASS lcl_event_handler IMPLEMENTATION .
*Handle Toolbar
METHOD handle_toolbar.
PERFORM handle_toolbar USING e_object e_interactive .
ENDMETHOD .
ENDCLASS.

FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
CLEAR ls_toolbar.
MOVE 'PER' TO ls_toolbar-function. "#EC NOTEXT
MOVE icon_display_text TO ls_toolbar-icon.
MOVE 'Passenger Info'(201) TO ls_toolbar-quickinfo.
MOVE 'Passenger Info'(201) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
CLEAR ls_toolbar.
MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT
MOVE 2 TO ls_toolbar-butn_type.
MOVE icon_calculation TO ls_toolbar-icon.
MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.
MOVE ' ' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object-&amp;gt;mt_toolbar.
ENDFORM .

DATA gr_event_handler TYPE REF TO lcl_event_handler .
.. ..
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler-&amp;gt;handle_user_command FOR gr_alvgrid .
SET HANDLER gr_event_handler-&amp;gt;handle_toolbar FOR gr_alvgrid .

call gr_alvgrid-&amp;gt;set_table_for_first_display....

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 13:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-alv-toolbar/m-p/3536428#M850884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T13:13:57Z</dc:date>
    </item>
  </channel>
</rss>

