<?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 Problem with method get_selected_rows in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647127#M1666314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I´m using class CL_GUI_ALV_GRID in my screen.&lt;/P&gt;&lt;P&gt;I created a STATUS-GUI with button in toolbar. When i click in this button, in PAI i execute method get_selected_rows to get lines selected. In the first time that i click on this button this method work fine. But in another time it not work, importing table return null. Why? How can i resolve that?&lt;/P&gt;&lt;P&gt;Please, help me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Apr 2012 20:28:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-04-04T20:28:18Z</dc:date>
    <item>
      <title>Problem with method get_selected_rows in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647127#M1666314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I´m using class CL_GUI_ALV_GRID in my screen.&lt;/P&gt;&lt;P&gt;I created a STATUS-GUI with button in toolbar. When i click in this button, in PAI i execute method get_selected_rows to get lines selected. In the first time that i click on this button this method work fine. But in another time it not work, importing table return null. Why? How can i resolve that?&lt;/P&gt;&lt;P&gt;Please, help me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 20:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647127#M1666314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-04T20:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with method get_selected_rows in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647128#M1666315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out the sample report : BCALV_EDIT_05&lt;/P&gt;&lt;P&gt;In the PAI module you need to invoke the method&amp;nbsp; to get selected rows:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CASE ok_code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN 'EDIT'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA: v_ridx TYPE lvc_t_row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL METHOD g_grid-&amp;gt;get_selected_rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; Get Rows Selected (Row Index)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMPORTING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; et_index_rows = v_ridx.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " USER_COMMAND_0100&amp;nbsp; INPUT&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Points to remember while using the method:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If &lt;STRONG&gt;only cells or columns &lt;/STRONG&gt;are selected, the ALV Grid Control returns an empty table.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;If the user has selected multiple rows, the indexes are generally sorted in ascending order in the table.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 22:22:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647128#M1666315</guid>
      <dc:creator>ShyamPindiproli</dc:creator>
      <dc:date>2012-04-04T22:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with method get_selected_rows in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647129#M1666316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without reviewing your code, my first thought is that you are not re-initializing your variables after the first selection, or you are not setting the values for subsequent clicks.&amp;nbsp; Set a debug and check what the values are during the first click.&amp;nbsp; Then click again and compare the first set of values to the values on subsequent clicks.&amp;nbsp; If you are using loop counters, be sure to check those for reinitializing also.&lt;/P&gt;&lt;P&gt;mr.kim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 22:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-method-get-selected-rows-in-alv/m-p/8647129#M1666316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-04T22:23:28Z</dc:date>
    </item>
  </channel>
</rss>

