<?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: Single selection in table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159006#M456490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Baldeep,&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Fewdays I faced the same problem....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Baldeep Your requirement is not possible just by set the table control attribute single row selection.You have to write some logic to accomplish this like putting one more like REFRESH write some code to refresh the table control.....i.e., already selected lines to be deselected.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hope this is helpful for you.&lt;/P&gt;&lt;P&gt;Reward all helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2007 06:11:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-25T06:11:09Z</dc:date>
    <item>
      <title>Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159002#M456486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck at a very unique problem. i have created a table control to display some data. from that control user can select only a single row. So for that i have set the table control attribute single row selection. Now the problem is suppose i have 50 rows in my internal table that is showing in table control. In the table control 25 rows are displayed at a time. When user presses Page down the next 25 rows are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when table control is showing first set of 25 rows, a user is able to select only a single row according to the attribute that i have set. But when a user selects any row in the first 25 rows and presses Page down and then selects another row in the next set of 25 rows, both the previous selection and the current selection are retained which i didnt wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i solve this problem.... really got stuck &lt;SPAN __jive_emoticon_name="cry"&gt;&lt;/SPAN&gt; &lt;SPAN __jive_emoticon_name="cry"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points guranteed!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:51:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159002#M456486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T05:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159003#M456487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Select the records that were selected in the table control into an internal table.&lt;/P&gt;&lt;P&gt;then describe that table for the number of records.&lt;/P&gt;&lt;P&gt;if count is more than one display error message saying that only one record has to be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159003#M456487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T05:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159004#M456488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the below code...it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Read index of selected rows
      CALL METHOD g_alvgrid-&amp;gt;get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.

DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines &amp;gt; 1.
  message 'Select only 1 row' type I.
   endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159004#M456488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T05:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159005#M456489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Baldeep , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I think there is some problem with the logic. You are able to select only one row when u see 25 rows in ur 1st page n again 1 select in ur 2nd page . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Why dont you use a condition for selecting only one row in the internal table. loop at the TC internal table and use the condition as wehn SEL = "X".  and as soon as u capture the 1st selected row exit from the loop . This way you can capture only one row out of the 2 rows from the Itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:59:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159005#M456489</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-04-25T05:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159006#M456490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Baldeep,&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Fewdays I faced the same problem....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Baldeep Your requirement is not possible just by set the table control attribute single row selection.You have to write some logic to accomplish this like putting one more like REFRESH write some code to refresh the table control.....i.e., already selected lines to be deselected.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hope this is helpful for you.&lt;/P&gt;&lt;P&gt;Reward all helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 06:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159006#M456490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T06:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159007#M456491</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 every PAI count the no. of selected records and in every PBO if the count is greater than one, then give the information message and unselect all those selected rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: count type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if count &amp;gt; 1.&lt;/P&gt;&lt;P&gt;    count = 0.&lt;/P&gt;&lt;P&gt;    message 'You can select only a single Record' type 'I' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at itab into wa.&lt;/P&gt;&lt;P&gt;      wa-mark = ' '.&lt;/P&gt;&lt;P&gt;      modify itab from wa.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE count_selected_rows INPUT.&lt;/P&gt;&lt;P&gt;    loop at itab into wa.&lt;/P&gt;&lt;P&gt;      if wa-mark = 'X'.&lt;/P&gt;&lt;P&gt;        count = count + 1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " count_selected_rows  INPUT\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Screen FlowLogic&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE STATUS_0100.&lt;/P&gt;&lt;P&gt;    LOOP AT ITAB INTO DEMO_CONN WITH CONTROL FLIGHTS.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  MODULE CANCEL AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;    module read_table_control.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;    module count_selected_rows.&lt;/P&gt;&lt;P&gt;  module user_command_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if useful,&amp;lt;/b&amp;gt;Regards,&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 11:03:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159007#M456491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T11:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159008#M456492</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;U need to &amp;lt;b&amp;gt;award points for useful answers&amp;lt;/b&amp;gt; and u have to mention it as solved if ur question is solved. Dont forget. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 10:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159008#M456492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T10:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Single selection in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159009#M456493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no need to put the messages at all like 'U have selected more than one page' and also there is no need to go for PBO for validating the sel field.&lt;/P&gt;&lt;P&gt;Simply put the code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_ekko.&lt;/P&gt;&lt;P&gt;  FIELD x_ekko-sel  MODULE tc_mark ON REQUEST.&lt;/P&gt;&lt;P&gt;  Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE tc_mark INPUT.&lt;/P&gt;&lt;P&gt; DATA: g_tc_wa2 LIKE LINE OF it_ekko.&lt;/P&gt;&lt;P&gt;  IF tc-line_sel_mode = 1&lt;/P&gt;&lt;P&gt;  AND x_ekko-sel = 'X'.&lt;/P&gt;&lt;P&gt;    LOOP AT it_ekko INTO g_tc_wa2&lt;/P&gt;&lt;P&gt;      WHERE sel = 'X'.&lt;/P&gt;&lt;P&gt;      g_tc_wa2-sel = ''.&lt;/P&gt;&lt;P&gt;      MODIFY it_ekko&lt;/P&gt;&lt;P&gt;        FROM g_tc_wa2&lt;/P&gt;&lt;P&gt;        TRANSPORTING sel.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  MODIFY it_ekko&lt;/P&gt;&lt;P&gt;    FROM x_ekko&lt;/P&gt;&lt;P&gt;    INDEX tc-current_line&lt;/P&gt;&lt;P&gt;    TRANSPORTING sel.&lt;/P&gt;&lt;P&gt;ENDMODULE.                    "TC_MARK INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 11:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-selection-in-table-control/m-p/2159009#M456493</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2007-05-07T11:13:20Z</dc:date>
    </item>
  </channel>
</rss>

