<?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 (Get cursor) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854708#M1135251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jagdish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the entire record on which you double click inALV, you can use the System variable&lt;/P&gt;&lt;P&gt;SY-LISEL. In this variable the complete line is fetched from the ALV. &lt;/P&gt;&lt;P&gt;As the column positions are fixed for each field, you can get the required data (Vendor No.) by reading  the exact column (char) nos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sachinkumar Mehta on Nov 25, 2008 8:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2008 07:04:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-25T07:04:28Z</dc:date>
    <item>
      <title>ALV (Get cursor)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854706#M1135249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAP experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                            I have an ALV list output.&lt;/P&gt;&lt;P&gt;Now if I double click on any of the record I need to capture the entire record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used "get cursor field" ,it captures the value where i have double clicked.&lt;/P&gt;&lt;P&gt;Is it possible to capture the entire row where I have double clicked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is I have vendor field in my output, if the user clicks vendor thats fine and i can navigate to vendor account balance transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the user clicks any other value apart from vendor I need to capture the vendor (corresponding to the value selected) and navigate to FBL1n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert in this regard.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Jay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 06:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854706#M1135249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T06:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: ALV (Get cursor)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854707#M1135250</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;In the &lt;STRONG&gt;i_callback_user_command&lt;/STRONG&gt; form you should check the &lt;STRONG&gt;r_ucomm&lt;/STRONG&gt; value. When double clicked r_ucomm equals to '&amp;amp;IC1'. Then you can get the double clicked row from &lt;STRONG&gt;rs_selfield-tabindex&lt;/STRONG&gt;. &lt;STRONG&gt;rs_selfield-fieldname&lt;/STRONG&gt; holds the value of double clicked field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' " ALV display function
       EXPORTING
            i_callback_program = gv_repid
            i_callback_user_command  = 'USER_COMMAND' "user_command form to be called
            it_fieldcat        = gt_fieldcat[]
            it_events          = gt_events
            i_callback_pf_status_set = 'SET_STATUS_ALV'
       IMPORTING
            e_exit_caused_by_caller = g_exit_caused_by_caller
            es_exit_caused_by_user  = gs_exit_caused_by_user
       TABLES
            t_outtab           = gt_itab
       EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield   TYPE   slis_selfield. 

  CASE r_ucomm.
    WHEN '&amp;amp;IC1'.     "doubleclick

       READ TABLE gt_itab INDEX rs_selfield-tabindex INTO ls_itab .

  ENDCASE .

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 07:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854707#M1135250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T07:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: ALV (Get cursor)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854708#M1135251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jagdish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the entire record on which you double click inALV, you can use the System variable&lt;/P&gt;&lt;P&gt;SY-LISEL. In this variable the complete line is fetched from the ALV. &lt;/P&gt;&lt;P&gt;As the column positions are fixed for each field, you can get the required data (Vendor No.) by reading  the exact column (char) nos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sachinkumar Mehta on Nov 25, 2008 8:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 07:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-get-cursor/m-p/4854708#M1135251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T07:04:28Z</dc:date>
    </item>
  </channel>
</rss>

