<?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 deleting itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073368#M95532</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 having 10 records in my output screen with check boxes.&lt;/P&gt;&lt;P&gt;I have one EXEC button also.&lt;/P&gt;&lt;P&gt;If i check any one of the records,and if i press EXEC button, i want to delete(remove) that particular record(line).Can any one tell me how to do that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points guaranteed.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;kaki&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2005 02:33:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-16T02:33:05Z</dc:date>
    <item>
      <title>deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073368#M95532</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 having 10 records in my output screen with check boxes.&lt;/P&gt;&lt;P&gt;I have one EXEC button also.&lt;/P&gt;&lt;P&gt;If i check any one of the records,and if i press EXEC button, i want to delete(remove) that particular record(line).Can any one tell me how to do that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points guaranteed.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;kaki&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2005 02:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073368#M95532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-16T02:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073369#M95533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that this is for the current program that you are working on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


at user-command.
case sy-ucomm.
when 'EXEC'.
check_box = space.
set pf-status 'EXEC'.
do report_lines times. 

read line sy-index field value check_box.
if check_box = 'X'.

&amp;lt;b&amp;gt;*read table T_INS with key PRUEFLOS = T_INS-PRUEFLOS.
delete itab where prueflos = t_ins_prueflos.&amp;lt;/b&amp;gt;



write:/ 'You have selected material',
T_INS-PRUEFLOS.
endif.
enddo.


&lt;/CODE&gt;&lt;/PRE&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, 16 Dec 2005 02:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073369#M95533</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-16T02:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073370#M95534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich&lt;/P&gt;&lt;P&gt;In your code it is not working. What might be the reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0002 no standard page heading.

data: imara type table of mara with header line.

data: check_box(1) type c,
      report_lines type i.


start-of-selection.

* Create the gui status with BACK button in standard place
* and a READ button in the application toolbar

  set pf-status 'CHECK'.

  select * into corresponding fields of table imara
           from mara up to 100 rows.

  loop at imara.
    write:/ check_box as checkbox, imara-matnr, imara-matkl.
    hide imara-matnr.

  endloop.

  report_lines  = sy-linno - 1.

top-of-page.

  write: 'List of materials'.
  uline.

top-of-page during line-selection.

  write:  'Material.....'.
  uline.

at user-command.

  case sy-ucomm.
    when 'READ'.
      check_box = space.
      set pf-status 'CHECK' excluding 'READ'.
      do report_lines times.
        read line sy-index field value check_box.

        if check_box = 'X'.
*        read table imara with key matnr = imara-matnr.
          &amp;lt;b&amp;gt;delete imara where matnr = imara-matnr.&amp;lt;/b&amp;gt;
          write:/  'You have selected material',
                 imara-matnr, imara-matkl, imara-groes.
        endif.
      enddo.
    WHEN 'BACK'.
      leave to screen 0.
  endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2005 03:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073370#M95534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-16T03:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073371#M95535</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 your code the check_box should be part of the internal table. Look at the corrections in bold&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0002 no standard page heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: imara type table of mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data : begin of imara occurs 0.&lt;/P&gt;&lt;P&gt;       check_box(1) type c.&lt;/P&gt;&lt;P&gt;       include structure mara.&lt;/P&gt;&lt;P&gt;data : end of imara&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: check_box(1) type c,&lt;/P&gt;&lt;P&gt; data :report_lines type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create the gui status with BACK button in standard place&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and a READ button in the application toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  set pf-status 'CHECK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * into corresponding fields of table imara&lt;/P&gt;&lt;P&gt;           from mara up to 100 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at imara.&lt;/P&gt;&lt;P&gt;    write:/ &amp;lt;b&amp;gt;imara-&amp;lt;/b&amp;gt;check_box as checkbox, imara-matnr, imara-matkl.&lt;/P&gt;&lt;P&gt;    hide imara-matnr.&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;  report_lines  = sy-linno - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write: 'List of materials'.&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page during line-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write:  'Material.....'.&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at user-command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case sy-ucomm.&lt;/P&gt;&lt;P&gt;    when 'READ'.&lt;/P&gt;&lt;P&gt;      check_box = space.&lt;/P&gt;&lt;P&gt;      set pf-status 'CHECK' excluding 'READ'.&lt;/P&gt;&lt;P&gt;      do report_lines times.&lt;/P&gt;&lt;P&gt;        read line sy-index field value check_box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if &amp;lt;b&amp;gt;imara-&amp;lt;/b&amp;gt;check_box = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       read table imara with key matnr = imara-matnr.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          delete imara where matnr = imara-matnr.&lt;/P&gt;&lt;P&gt;          write:/  'You have selected material',&lt;/P&gt;&lt;P&gt;                 imara-matnr, imara-matkl, imara-groes.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      enddo.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;      leave to screen 0.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2005 03:20:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073371#M95535</guid>
      <dc:creator>govind_seenivasan</dc:creator>
      <dc:date>2005-12-16T03:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073372#M95536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you debug it, you notice that it is deleting the entry from the ITAB.  You have to re-write the list in order to see it reflected.  You are seeing an old version of the list on the screen. If you were to re-write it, you would see that a specific material has been deleted from the itab.&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, 16 Dec 2005 03:24:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073372#M95536</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-16T03:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073373#M95537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a modify version where we are re-writing the list everytime you delete something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0002 no standard page heading.

data: imara type table of mara with header line.

data: check_box(1) type c,
      report_lines type i.


start-of-selection.

* Create the gui status with BACK button in standard place
* and a READ button in the application toolbar

  set pf-status 'CHECK'.

  select * into corresponding fields of table imara
           from mara up to 100 rows.

  loop at imara.
    write:/ check_box as checkbox, imara-matnr, imara-matkl.
    hide imara-matnr.

  endloop.

  report_lines  = sy-linno - 1.

top-of-page.

  write: 'List of materials'.
  uline.

top-of-page during line-selection.

  write:  'Material.....'.
  uline.

at user-command.

  case sy-ucomm.
    when 'READ'.
      check_box = space.
      set pf-status 'CHECK' excluding 'READ'.
      do report_lines times.
        read line sy-index field value check_box.

&amp;lt;b&amp;gt;        if check_box = 'X'.
*        read table imara with key matnr = imara-matnr.
          delete imara where matnr = imara-matnr.
*          write:/  'You have selected material',
*                 imara-matnr, imara-matkl, imara-groes.
        endif.
      enddo.


      set pf-status 'CHECK'.
      clear check_box.
      loop at imara.
        write:/ check_box as checkbox, imara-matnr, imara-matkl.
        hide imara-matnr.
      endloop.
      sy-lsind = sy-lsind - 1.&amp;lt;/b&amp;gt;


    when 'BACK'.
      leave to screen 0.
  endcase.

&lt;/CODE&gt;&lt;/PRE&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, 16 Dec 2005 03:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073373#M95537</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-16T03:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: deleting itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073374#M95538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;Thank you.I got it.&lt;/P&gt;&lt;P&gt;Points alloted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kaki&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kaki R&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2005 03:33:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deleting-itab/m-p/1073374#M95538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-16T03:33:47Z</dc:date>
    </item>
  </channel>
</rss>

