<?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 selecting a row using cl_salv_table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705473#M1453031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the new object model cl_salv_table. So, I don't need the event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Mar 2010 02:19:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-12T02:19:50Z</dc:date>
    <item>
      <title>Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705469#M1453027</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'm having an issue where my row selection is not being captured. I'm using cl_salv_table and having the codes in SE24. Everything was fine initially when the ALV is displayed. I can somehow select the row for the first time and the row selection is being captured in lt_row. When I click on SAVE (PAI coded in se80), I will call METHOD A (below) which have the code for selecting the line and process something. The issue arise whenever the process is done and the selected row is deleted, selecting another row and clicking SAVE didn't seems to populate lt_row anymore. This is what I don't understand. I construct my ALV in METHOD A, selecting the row &amp;amp; process it in METHOD B &amp;amp; my SAVE button in PAI (SE80). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD A&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_salv_table=&amp;gt;factory&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;r_container = lo_container&lt;/P&gt;&lt;P&gt;container_name = 'CONTAINER'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;r_salv_table = go_alv&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;t_table = gt_data.&lt;/P&gt;&lt;P&gt;CATCH cx_salv_msg.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;gr_selection = go_alv-&amp;gt;get_selections( ).&lt;/P&gt;&lt;P&gt;gr_selection-&amp;gt;set_selection_mode( if_salv_c_selection_mode=&amp;gt;row_column ).&lt;/P&gt;&lt;P&gt;go_alv-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD B&lt;/P&gt;&lt;P&gt;lt_temp[] = gt_data[].&lt;/P&gt;&lt;P&gt;go_alv-&amp;gt;get_metadata( ).  --&amp;gt; I can only select the row for the first time after I place this line in. If not, I can't select at all.&lt;/P&gt;&lt;P&gt;lt_row = gr_selection-&amp;gt;get_selected_rows( ).&lt;/P&gt;&lt;P&gt;IF lt_row IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;"do something.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;go_alv-&amp;gt;set_data(CHANGING t_table = gt_data ).&lt;/P&gt;&lt;P&gt;go_alv-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PAI (USER_COMMAND)&lt;/P&gt;&lt;P&gt;go_object-&amp;gt;METHOD A( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 01:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705469#M1453027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T01:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705470#M1453028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alvin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you have another post too on a similar issue. It is difficult to see through your logic. I hope you have taken a look at the many DEMO programs provided by SAP. I remember a demo program in ALV GRID that outputs the row number of selected row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 01:33:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705470#M1453028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T01:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705471#M1453029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fred, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I did look at the sample. I have no problem if I code my program in 1 piece (all via SE80). But now my requirement is to separate the program logic (needs to code in SE24) from the screen logic (SE80). I'm not very familiar with OO s o there might be a link or certain instantiation which I have missed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 01:38:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705471#M1453029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T01:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705472#M1453030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry if I am stating the obvious, I hope you have defined local classes to handle the alv changes, and used set handler &amp;lt;.....-&amp;gt;handle_data_changed&amp;gt; for the alv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 02:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705472#M1453030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T02:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705473#M1453031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the new object model cl_salv_table. So, I don't need the event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 02:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705473#M1453031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T02:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with selecting a row using cl_salv_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705474#M1453032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you do need the event handler.  See the event handler method on_user_command in the example program  SALV_DEMO_TABLE_SELECTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&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>Fri, 12 Mar 2010 02:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-selecting-a-row-using-cl-salv-table/m-p/6705474#M1453032</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2010-03-12T02:44:09Z</dc:date>
    </item>
  </channel>
</rss>

