<?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: TableControl - determine marked line in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858528#M47562</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;The table control has to have the column for line-selection indicator. In your PAI, when you loop through the Table Control, you can determine which line was selected by checking if this indicator is set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information , refer to the Help on Table Cntrols oin the ABAP Programming section of the documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2005 14:17:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-04-20T14:17:14Z</dc:date>
    <item>
      <title>TableControl - determine marked line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858527#M47561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a beginner question:&lt;/P&gt;&lt;P&gt;We show some data in a table control and want to delete the line from database which the user has selected.&lt;/P&gt;&lt;P&gt;Where and how do we have to identify the line to delete?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help,&lt;/P&gt;&lt;P&gt;Andre Siegling&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2005 14:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858527#M47561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-20T14:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl - determine marked line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858528#M47562</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;The table control has to have the column for line-selection indicator. In your PAI, when you loop through the Table Control, you can determine which line was selected by checking if this indicator is set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information , refer to the Help on Table Cntrols oin the ABAP Programming section of the documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2005 14:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858528#M47562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-20T14:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl - determine marked line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858529#M47563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the fast answer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the mark column does exist - but the loop does not work. Do you have a code sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2005 14:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858529#M47563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-20T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl - determine marked line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858530#M47564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out the demo program DEMO_DYNPRO_TABLE_CONTROL_2, to get an idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2005 14:25:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858530#M47564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-20T14:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl - determine marked line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858531#M47565</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;The database table should contain a character field of length 1 (say mark) in addition to other fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI , you have to loop like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;*itab is the name of the internal table with header line&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Marking the row to be deleted by using this field(mark)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FIELD itab-mark MODULE check.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE user_command_9000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declaration&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;here zzz_abc is the name of the database table which &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;should contain mark as one of the field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF zzz_abc WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CONTROLS: t_ctrl TYPE TABLEVIEW USING SCREEN '9000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE check INPUT.&lt;/P&gt;&lt;P&gt;  MODIFY itab INDEX t_ctrl-current_line.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " CHECK  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_9000 INPUT.&lt;/P&gt;&lt;P&gt;  DATA :lv_fcode LIKE sy-ucomm,    "Function Code&lt;/P&gt;&lt;P&gt;        lv_answer(1) type c.       "Storing the answer&lt;/P&gt;&lt;P&gt;  lv_fcode = sy-ucomm.&lt;/P&gt;&lt;P&gt;  CASE lv_fcode.&lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the flag to make the table control in editable * mode after deleting the selected line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      flg = 'Y'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Confirmation of delete&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;         TITLEBAR       = 'Confirm'&lt;/P&gt;&lt;P&gt;         text_question  = 'Are you sure to delete from database?'&lt;/P&gt;&lt;P&gt;         TEXT_BUTTON_1  = 'Yes'(001)&lt;/P&gt;&lt;P&gt;         TEXT_BUTTON_2  = 'No'(002)&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;         ANSWER         =  lv_answer.&lt;/P&gt;&lt;P&gt;      if lv_answer eq '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        UPDATE zzz_abc FROM TABLE itab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DELETE itab WHERE mark = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DELETE FROM itab WHERE mark = 'X'.&lt;/P&gt;&lt;P&gt;        MESSAGE s005 WITH 'Deleted Successfully'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_9000  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jayanthi Jayaraman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jayanthi Jayaraman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2005 03:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tablecontrol-determine-marked-line/m-p/858531#M47565</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-04-21T03:48:14Z</dc:date>
    </item>
  </channel>
</rss>

