<?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: ALV Grid left Most Button in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908132#M56495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durairaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes..i mean the row selection button. I want to handled the button click event of the row selection button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds &lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jun 2005 09:37:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-10T09:37:11Z</dc:date>
    <item>
      <title>ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908126#M56489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created a ALV grid control. I want to handle the left most button of the alv grid, which when clicked , entire row gets selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to do some functionality when this button is clicked. So, can anybody help me in handling this button event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2005 18:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908126#M56489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-09T18:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908127#M56490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about just making the row a hotspot.  When user double clicks the row, trigger some functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: begin of i_alv occurs 0,
      matnr type mara-matnr,
      maktx type makt-maktx,
      end of i_alv.

***********************************************************************
*       CLASS lcl_event_receiver DEFINITION      Handles Double Click
***********************************************************************
class lcl_event_receiver definition.
  public section.
    methods handle_double_click
      for event double_click of cl_gui_alv_grid
      importing e_row e_column.
  private section.
endclass.

***********************************************************************
*       CLASS lCL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
***********************************************************************
class lcl_event_receiver implementation.
  method handle_double_click.
    perform drill_down using e_row-index.
  endmethod.
endclass.


data: alv_container  type ref to cl_gui_custom_container.
data: event_receiver type ref to lcl_event_receiver.
data: alv_grid       type ref to cl_gui_alv_grid.
data: layout    type lvc_s_layo.
data: fieldcat  type lvc_t_fcat.

selection-screen begin of block b1 with frame title text-001 .
select-options: s_matnr for i_alv-matnr.
selection-screen end of block b1.

start-of-selection.

  select * into corresponding fields of table i_alv
        from mara
          inner join makt
            on mara~matnr = makt~matnr
               where mara~matnr in s_matnr
                 and makt~spras = sy-langu.

  sort i_alv ascending by matnr.


  call screen 100.

************************************************************************
*      Module  status_0100  OUTPUT
************************************************************************
module status_0100 output.
  set pf-status '0100'.
  set titlebar '0100'.

  data: variant type  disvariant.

  variant-report = sy-repid.
  variant-username = sy-uname.

* Create Controls
  create object alv_container
         exporting
               container_name    = 'ALV_CONTAINER'.

  create object alv_grid
         exporting
               i_parent          =  alv_container.

*  Create Event Receiver
  create object event_receiver.

*  ALV Specific. Data selection.
*  Populate Field Catalog
  data: ls_fcat type lvc_s_fcat.
  refresh: fieldcat.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Material Number'.
  ls_fcat-coltext    = 'Material Number'.
  ls_fcat-fieldname  = 'MATNR'.
  ls_fcat-ref_table  = 'I_ALV'.
  ls_fcat-outputlen  = '18'.
  ls_fcat-col_pos    = 1.
  append ls_fcat to fieldcat.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Material Description'.
  ls_fcat-coltext    = 'Material Description'.
  ls_fcat-fieldname  = 'MAKTX'.
  ls_fcat-ref_table  = 'I_ALV'.
  ls_fcat-outputlen  = '40'.
  ls_fcat-col_pos    = 2.
  append ls_fcat to fieldcat.


* Set table for display
  call method alv_grid-&amp;gt;set_table_for_first_display
      exporting
           is_layout              = layout
           is_variant             = variant
           i_save                 = 'U'
           i_structure_name       = 'I_ALV'
      changing
           it_outtab       = i_alv[]
           it_fieldcatalog = fieldcat[].

*   handler for ALV grid
  set handler event_receiver-&amp;gt;handle_double_click for alv_grid.

endmodule.

************************************************************************
*      Module  USER_COMMAND_0100  INPUT
************************************************************************
module user_command_0100 input.

  case sy-ucomm.
    when 'BACK' or 'CANC'.
      if not alv_container is initial.
        call method alv_container-&amp;gt;free.
        clear: alv_container.
        free : alv_container.
      endif.
      if sy-subrc = 0.
        set screen 0.
        leave screen.
      else.
        leave program.
      endif.
    when 'EXIT'.
      if not alv_container is initial.
        call method alv_container-&amp;gt;free.
        clear: alv_container.
        free : alv_container.
      endif.
      leave program.
  endcase.

endmodule.

************************************************************************
* DRILL_DOWN
************************************************************************
form drill_down using index.

  read table i_alv index index.
  if sy-subrc = 0.
    set parameter id 'MAT' field i_alv-matnr.
    call transaction 'MM03' and skip first screen.
    if not alv_container is initial.
      call method alv_container-&amp;gt;free.
      clear: alv_container.
      free : alv_container.
    endif.
  endif.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2005 18:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908127#M56490</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-09T18:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908128#M56491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can make use of the tutorial &amp;lt;a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf"&amp;gt;"An Easy Reference for ALV Grid Control"&amp;lt;/a&amp;gt;.&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;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2005 21:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908128#M56491</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-06-09T21:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908129#M56492</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;Thanks for you help...but my requirement is that I have to click the left most button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kalyans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 05:48:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908129#M56492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-10T05:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908130#M56493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;left most button&amp;lt;/b&amp;gt; - &amp;gt; whats the button name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you mean the row selection button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 07:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908130#M56493</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-06-10T07:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908131#M56494</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;Use the method get_selected_lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_selline TYPE  lvc_t_row.      " Tabellenzeilen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CLEAR: gt_selline[].&lt;/P&gt;&lt;P&gt;   CALL METHOD hnd_grid_sd-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;        IMPORTING et_index_rows = gt_selline.&lt;/P&gt;&lt;P&gt;   IF gt_selline[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      MESSAGE i000(38) WITH 'Not pressed!'.&lt;/P&gt;&lt;P&gt;   else.&lt;/P&gt;&lt;P&gt;      MESSAGE i000(38) WITH 'Pressed!'.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I could help you.&lt;/P&gt;&lt;P&gt;(If so, please mark your question as solved.&lt;/P&gt;&lt;P&gt;Reward points would be nice &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 08:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908131#M56494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-10T08:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908132#M56495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durairaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes..i mean the row selection button. I want to handled the button click event of the row selection button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds &lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 09:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908132#M56495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-10T09:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908133#M56496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry micheal this is not what i want. I want to handle the button click of the row selection button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 09:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908133#M56496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-10T09:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908134#M56497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not implemented such a way that row selection fields can not trigger any events. Instead, you can make some fields to be hotspot, but if you require to fire somethings as soon as a row is selected, as far as I know ther is no way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I remember &amp;lt;a href="http://forums.sdn.sap.com/thread.jspa%3FthreadID%3D32162"&amp;gt;one of your previous threads&amp;lt;/a&amp;gt; is not closed. It seems you are not familiar with this and thus let me introduce you something about the SDN: You can assign points to posts you find helpful using the points scale at the left of each post. By assigning a 10-point or selecting "solved my own" at the left of your original post you close tyhe issue.&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;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 10:59:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908134#M56497</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-06-10T10:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid left Most Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908135#M56498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I forgot to explain, that this is a work-arround&lt;/P&gt;&lt;P&gt;for checking whether the Row is selected or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For catching the event itself no method exists&lt;/P&gt;&lt;P&gt;up to now. &lt;/P&gt;&lt;P&gt;Sorry about that!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way is, set the Layout-Property to NO-MARK&lt;/P&gt;&lt;P&gt;and create a Column as a icon. Than use the Doppelklick&lt;/P&gt;&lt;P&gt;or hot-spot method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2005 12:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-left-most-button/m-p/908135#M56498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-10T12:41:31Z</dc:date>
    </item>
  </channel>
</rss>

