<?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 Logic required for a Internal table  issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504811#M1422402</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;I have two internal table, 1st one called it_table1 and 2nd one called it_table2. It_table2 having it_table1 records plus we more rows of records. for example if it_table1 having 5 rows of internal table records then it_table2 having 5 rows + 4 more rows of records, so total is 9 rows of records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is i need that 4 more records only into another internal table called it_table3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls give me a logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jan 2010 08:57:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-12T08:57:01Z</dc:date>
    <item>
      <title>Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504811#M1422402</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;I have two internal table, 1st one called it_table1 and 2nd one called it_table2. It_table2 having it_table1 records plus we more rows of records. for example if it_table1 having 5 rows of internal table records then it_table2 having 5 rows + 4 more rows of records, so total is 9 rows of records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is i need that 4 more records only into another internal table called it_table3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls give me a logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 08:57:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504811#M1422402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T08:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504812#M1422403</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;1. LOOP at ITAB2.&lt;/P&gt;&lt;P&gt;2. Read ITab1 with key fields&lt;/P&gt;&lt;P&gt;3. If sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;4. Append it to new table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this Helps,&lt;/P&gt;&lt;P&gt;Nag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naga Mohan Kummara on Jan 12, 2010 9:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 08:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504812#M1422403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T08:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504813#M1422404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_table2 into is_2.
 read table it_table1 into is_1 with key is_2-keyfield1.."use the required key fields 
 if sy-subrc NE 0. "i.e record is not present in table1.
   append is_2 to it_table3.
 endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504813#M1422404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504814#M1422405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT IT_TABLE2.&lt;/P&gt;&lt;P&gt;  READ TABLE IT_TABLE1 WITH KEY &amp;lt;KEY1&amp;gt; = &amp;lt;TABLE2-KEY&amp;gt;.&lt;/P&gt;&lt;P&gt;     IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;         APPEND TABLE2 TO &amp;lt;NEW TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:03:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504814#M1422405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504815#M1422406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohana Vijayan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use as follows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Loop at tab1 into wa1.

clear wa2.
read table tab2 into wa2 with key.....&amp;lt;wa1-...condition&amp;gt;

IF sy-subrc ne 0.

append wa2 to tab3.

endif.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:10:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504815#M1422406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504816#M1422407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually i need the 4 rows only in to another internal table, if i use read statments, maybe the key fields records will repeat. So it wont work. anyother way is there to get the extra rows to another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504816#M1422407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504817#M1422408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Off course they will be repeated if there are any.&lt;/P&gt;&lt;P&gt;I think your requirement has to be solved with the solution all of them have given. If you are getting duplicate reords, use &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;delete adjacent duplicates from itab_3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sumit Nene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504817#M1422408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504818#M1422409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Mohana,&lt;/P&gt;&lt;P&gt;Correct me if my understanding is wrong..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to copy last 4 rows (which are not there in first internal) .. and you can not check with Key as it might have same values.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Describe ITAb1 - rows  (say x)&lt;/P&gt;&lt;P&gt;2. Loop at ITAB2 where index &amp;gt; x&lt;/P&gt;&lt;P&gt;and APpend it to New internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this does not solve.. Please explain your problem with an example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504818#M1422409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required for a Internal table  issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504819#M1422410</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;You can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
it_tab3 = it_tab2.
delete it_tab1 from it_tab3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 09:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required-for-a-internal-table-issue/m-p/6504819#M1422410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T09:48:58Z</dc:date>
    </item>
  </channel>
</rss>

