<?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 Delete line from table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457733#M551174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could some one explain me, as to what the following part does for deleting the lines from the table control.  This code is taken from the example program : DEMO_DYNPRO_TABCONT_LOOP_AT.&lt;/P&gt;&lt;P&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;DATA: cols LIKE LINE OF flights-cols,&lt;/P&gt;&lt;P&gt;      lines TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE TABLE OF demo_conn.&lt;/P&gt;&lt;P&gt;TABLES demo_conn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT flights-cols INTO cols WHERE index GT 2.&lt;/P&gt;&lt;P&gt;  cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;  MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        LOOP AT itab INTO demo_conn WHERE mark = 'X'.&lt;/P&gt;&lt;P&gt;          DELETE itab.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;========================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, i am not using any table like demo_conn.  I am trying to delete the lines at the entry stage itself ie., after entering the data in the screen and before saving, I want to select and delete a particular line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly explain in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2007 05:29:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-25T05:29:30Z</dc:date>
    <item>
      <title>Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457733#M551174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could some one explain me, as to what the following part does for deleting the lines from the table control.  This code is taken from the example program : DEMO_DYNPRO_TABCONT_LOOP_AT.&lt;/P&gt;&lt;P&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;DATA: cols LIKE LINE OF flights-cols,&lt;/P&gt;&lt;P&gt;      lines TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE TABLE OF demo_conn.&lt;/P&gt;&lt;P&gt;TABLES demo_conn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT flights-cols INTO cols WHERE index GT 2.&lt;/P&gt;&lt;P&gt;  cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;  MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        LOOP AT itab INTO demo_conn WHERE mark = 'X'.&lt;/P&gt;&lt;P&gt;          DELETE itab.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;========================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, i am not using any table like demo_conn.  I am trying to delete the lines at the entry stage itself ie., after entering the data in the screen and before saving, I want to select and delete a particular line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly explain in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457733#M551174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457734#M551175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;DELETE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will delete the line from Table Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457734#M551175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457735#M551176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete Logic you are asking works as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here MARK is the field we use to select line on the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it loops at the table control where the user has marked the lines to be deleted and deletes all the lines from the table control internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the same internal table which is used to display the data on the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Kunjal Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:35:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457735#M551176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457736#M551177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MArk,&lt;/P&gt;&lt;P&gt;  When you press the DELETE button it will check the lines. &lt;/P&gt;&lt;P&gt;DEMO_CONN-MARK is the placeholder defined in the table control attribute's&lt;/P&gt;&lt;P&gt;W/SelColumn.&lt;/P&gt;&lt;P&gt;You can check it through SE51 or by double clicking to call screen statement in same program.&lt;/P&gt;&lt;P&gt;Whenver you select a line mark value is 'X'.&lt;/P&gt;&lt;P&gt;So it will delete only those lines.&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457736#M551177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457737#M551178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mark...&lt;/P&gt;&lt;P&gt;consider the below given code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_cocodes into it_cocodes_wa.&lt;/P&gt;&lt;P&gt;read table it_cocodes_000 with key bukrs = it_cocodes_wa-bukrs.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;delete it_cocodes.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here there are 2 tables-- &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;it_cocodes&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;it_cocodes_000&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if the records in both the tables match then i m deleting that record from it_cocodes table by just using this statement-&amp;gt; &amp;lt;b&amp;gt;delete it_cocodes.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Roshani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457737#M551178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457738#M551179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roshani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_cocodes  : -  This is an internal table.&lt;/P&gt;&lt;P&gt;it_cocodes_wa :- This is the work are.&lt;/P&gt;&lt;P&gt;it_cocodes_000 :-  What is this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My doubt is that, how the selected line in the screen, will get deleted in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u pls explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 06:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457738#M551179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T06:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457739#M551180</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;item_itab is the internal table which is holding the data being shown in the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHEN 'DEL_ROW'."function code for del_row in details screen&lt;/P&gt;&lt;P&gt;    DATA L_SELLINE LIKE SY-STEPL.&lt;/P&gt;&lt;P&gt;    GET CURSOR LINE L_SELLINE.&lt;/P&gt;&lt;P&gt;    IF L_SELLINE &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      DELETE ITEM_ITAB INDEX L_SELLINE.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE S002(Z_MSG_TAB).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 06:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457739#M551180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457740#M551181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mark,&lt;/P&gt;&lt;P&gt;it_cocodes_000 is also an internbal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me xplain u this way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_cocodes contains these records...&lt;/P&gt;&lt;P&gt;a, b, c ,d.&lt;/P&gt;&lt;P&gt;it_cocodes_000 contains these records...&lt;/P&gt;&lt;P&gt;a,b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my aim is to delete records from it_cocodes which are present in it_cocodes_000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this purpose i use the above mentioned code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_cocodes into it_cocodes_wa.&lt;/P&gt;&lt;P&gt;read table it_cocodes_000 with key bukrs = it_cocodes_wa-bukrs.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete it_cocodes.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this code the table it_cocodes will contain these records...&lt;/P&gt;&lt;P&gt;c,d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Roshani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 06:43:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457740#M551181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T06:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457741#M551182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roshani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your explaination is clear. But, my doubt is that, how the it_cocodes_000 gets the records  a,b.  Are these records are selected for deletion in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 07:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457741#M551182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T07:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457742#M551183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mark,&lt;/P&gt;&lt;P&gt;No... it_cocodes_000 is populated using a select query...&lt;/P&gt;&lt;P&gt;the code that i mentioned merely reads the two internal table and deletes the records of table 1 from table 2.&lt;/P&gt;&lt;P&gt;what is your requirement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 08:35:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457742#M551183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T08:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457743#M551184</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;My requirement is that,  in the screen I have typed 4 lines.  Out of these 4 lines, i want to delete line 2.  How to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 08:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457743#M551184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T08:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457744#M551185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Consider U have typed 4 lines in the Table control.It will get stored in internal table.After the 2 nd line is deleted ie.,when u press delete button it should delete the second record from Internal table &amp;amp; re-display the Internal table values in the Table Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 08:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457744#M551185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T08:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457745#M551186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; Consider U have typed 4 lines in the Table&lt;/P&gt;&lt;P&gt;&amp;gt; control.It will get stored in internal table.After&lt;/P&gt;&lt;P&gt;&amp;gt; the 2 nd line is deleted ie.,when u press delete&lt;/P&gt;&lt;P&gt;&amp;gt; button it should delete the second record from&lt;/P&gt;&lt;P&gt;&amp;gt; Internal table &amp;amp; re-display the Internal table&lt;/P&gt;&lt;P&gt;&amp;gt;  values in the Table Control.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Padmam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; Consider U have typed 4 lines in the Table&lt;/P&gt;&lt;P&gt;&amp;gt; control.It will get stored in internal table.After&lt;/P&gt;&lt;P&gt;&amp;gt; the 2 nd line is deleted ie.,when u press delete&lt;/P&gt;&lt;P&gt;&amp;gt; button it should delete the second record from&lt;/P&gt;&lt;P&gt;&amp;gt; Internal table &amp;amp; re-display the Internal table&lt;/P&gt;&lt;P&gt;&amp;gt;  values in the Table Control.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Padmam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U r right. But, i want to know how to delete the 2nd line from the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457745#M551186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457746#M551187</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;First,U fetch the datas from the tablecontrol &amp;amp; move it to workarea.From workarea delete that record from Internal Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TABLE &amp;lt;itab&amp;gt; FROM &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all Helpful Answers.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457746#M551187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line from table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457747#M551188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mark...i just wrote this code here... &lt;/P&gt;&lt;P&gt;just 1 thing u need to do here...double click on the "status" and create a field delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZROSH_TEST&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zrosh_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS : slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_fieldcat  TYPE slis_t_fieldcat_alv&lt;/P&gt;&lt;P&gt;                        WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;         gd_layout    TYPE slis_layout_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM mara INTO CORRESPONDING FIELDS OF TABLE itab UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;DATA i_repid LIKE sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gt_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;gt_fieldcat-seltext_m = 'Material Number'.&lt;/P&gt;&lt;P&gt;APPEND gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gt_fieldcat-fieldname = 'PSTAT'.&lt;/P&gt;&lt;P&gt;gt_fieldcat-seltext_m = 'Maintenance status'.&lt;/P&gt;&lt;P&gt;APPEND gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   i_callback_program                = i_repid&lt;/P&gt;&lt;P&gt;   i_callback_pf_status_set          = 'SET_PF_STATUS'&lt;/P&gt;&lt;P&gt;   i_callback_user_command           = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   i_grid_title                      = 'test program'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   it_fieldcat                       = gt_fieldcat[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    t_outtab                          = itab&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   program_error                     = 1&lt;/P&gt;&lt;P&gt;   OTHERS                            = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM set_pf_status USING rt_extab TYPE slis_t_extab.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'STATUS' EXCLUDING rt_extab.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "set_pf_status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*at line selction in ALV grid.&lt;/P&gt;&lt;P&gt;FORM user_command USING r_ucomm TYPE sy-ucomm&lt;/P&gt;&lt;P&gt;                        rs_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;  CASE r_ucomm.&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;IC1' OR 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT itab.&lt;/P&gt;&lt;P&gt;        READ TABLE itab INDEX rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          DELETE itab index rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              i_callback_program                = i_repid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              it_fieldcat                       = gt_fieldcat[]&lt;/P&gt;&lt;P&gt;             TABLES&lt;/P&gt;&lt;P&gt;               t_outtab                          = itab&lt;/P&gt;&lt;P&gt;            EXCEPTIONS&lt;/P&gt;&lt;P&gt;              program_error                     = 1&lt;/P&gt;&lt;P&gt;              OTHERS                            = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          EXIT.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "user_command&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;Roshani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-line-from-table-control/m-p/2457747#M551188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:26:25Z</dc:date>
    </item>
  </channel>
</rss>

