<?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: Delete from Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999529#M955566</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;combined two internal table into final_itab and use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES final_itab COMPARING VALUES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishvesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2008 09:22:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-09T09:22:01Z</dc:date>
    <item>
      <title>Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999526#M955563</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;I have 2 internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB1 has 100 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB 2 has 10 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to delete the records from ITAB1 which are present in the ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is htere any way without using the LOOP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:16:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999526#M955563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999527#M955564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   read itab2 into wa index sy-index.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  if sy-sbrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   exit.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read itab1 where itab1 eq wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;   delete itab1.&lt;/P&gt;&lt;P&gt;  modify itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999527#M955564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999528#M955565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there....&lt;/P&gt;&lt;P&gt;do as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt;if itab1-field1 eq itab2-field1 and itab1-field2 eq itab2-field2.....&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;update itab2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it helps...&lt;/P&gt;&lt;P&gt; do reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:21:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999528#M955565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999529#M955566</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;combined two internal table into final_itab and use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES final_itab COMPARING VALUES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishvesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:22:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999529#M955566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999530#M955567</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;PRE&gt;&lt;CODE&gt;LOOP AT ITAB1 into wa_itab1
READ TABLE ITAB2 WITH VAR = wa_itab1-VAR1.
DELETE TAble ITAB1 from wa_itab1
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:24:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999530#M955567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999531#M955568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not possible without some sort of loop. My general approach would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- LOOP AT the smaller table using ASSIGNING (not INTO)&lt;/P&gt;&lt;P&gt;- READ the corresponding entry in the larger table (table should be of type SORTED, use full table key for access) using TRANSPORTING NO FIELDS&lt;/P&gt;&lt;P&gt;- if found, DELETE that entry from the larger table using INDEX &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:46:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999531#M955568</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-06-09T10:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999532#M955569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;If same fields are there in both internal tables then you can combine data in one internal table and just use DELETE ADJACENT DUPLICATES ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; if different fields are there then use&lt;/P&gt;&lt;P&gt;LOOP AT it_prd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_chs WITH KEY&lt;/P&gt;&lt;P&gt;                             spras = 'E'&lt;/P&gt;&lt;P&gt;                             msehi = it_prd-msehi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    WRITE:/ w_tmp.&lt;/P&gt;&lt;P&gt;    APPEND it_prd TO it_s.&lt;/P&gt;&lt;P&gt;    incs = incs + 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    clear it_chs.&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;reward points if useful.&lt;/P&gt;&lt;P&gt;thx,&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999532#M955569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999533#M955570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be you dont want looping because of performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in delete statement you provide values in where condition which are in itab2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999533#M955570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999534#M955571</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;&lt;/P&gt;&lt;P&gt;To reduce time taken,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab2.&lt;/P&gt;&lt;P&gt;delete itab1 where key1 = itab1-key1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all, you will loop only 10 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 11:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999534#M955571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T11:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999535#M955572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pranu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are looking for a sinle code line whic can delete one internal table rows from another similar internal table... then I am sorry there is no such way as of now. You have to use some form logic with loop process as described by SDN members.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However "DELETE ADJACENT DUPLICATES FROM... " may not meet the requirement as one set of value still remains in the table and only the duplicate entry is removed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mahidhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 11:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999535#M955572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T11:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999536#M955573</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;Please refer the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at itab1.
 
   read table itab2 with key f1 = itab1-f1. "Use all necessary key fields.

if sy-subrc eq 0.
 delete itab1.
 clear itab1.
endif.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 11:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999536#M955573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T11:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999537#M955574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;    pls try this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 .&lt;/P&gt;&lt;P&gt;    read table itab2 with key matnr = itab1-matnr .&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; delete itab1 index sy-tabix .&lt;/P&gt;&lt;P&gt;endif .&lt;/P&gt;&lt;P&gt;clear itab1 .&lt;/P&gt;&lt;P&gt;endloop .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 11:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-internal-table/m-p/3999537#M955574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T11:51:05Z</dc:date>
    </item>
  </channel>
</rss>

