<?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: Manipulating Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468139#M1416794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;sort itab by matnr plant.&lt;/P&gt;&lt;P&gt;loop at the same internal table.&lt;/P&gt;&lt;P&gt;check if the third field is "y'.&lt;/P&gt;&lt;P&gt;then read the same internal tabel with third field eq 'N'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;append it to the new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at Itab into workarea.&lt;/P&gt;&lt;P&gt;if thirdfield eq 'Y'.&lt;/P&gt;&lt;P&gt;read Itab into workarea2 with key matnr plant thirdfield eq 'N'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;append workarea to new internal table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear workarea1.workarea2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Javed Parvez on Jan 18, 2010 9:19 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jan 2010 08:18:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-18T08:18:37Z</dc:date>
    <item>
      <title>Manipulating Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468137#M1416792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abappers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 1 internal table as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material  Plant   Flag&lt;/P&gt;&lt;P&gt;A           1         Y&lt;/P&gt;&lt;P&gt;B           1         N&lt;/P&gt;&lt;P&gt;C           1         Y&lt;/P&gt;&lt;P&gt;C           1         N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, I have to take those material for which flag is both Y and N for the same materail and Plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As C has both Y and N for the same plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to extract material C into different interanal table.&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;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 07:55:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468137#M1416792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T07:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468138#M1416793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this helps, its not tested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab by material plant ascending.
loop at itab into wa.
lv_index2 = sy-tabix.
at new wa-plant.
read table itab into wa index sy-tabix.
if sy-subrc = 0.
lv_flag = wa-flag.
lv_index1 = sy-tabix.
continue.
endif.
endat.
if lv_flag ne wa-flag.
append lines of itab to itab2 from lv_index1 to lv_index2 . "check this syntax.
clear lv_index1.
clear lv_index2.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 08:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468138#M1416793</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-18T08:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468139#M1416794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;sort itab by matnr plant.&lt;/P&gt;&lt;P&gt;loop at the same internal table.&lt;/P&gt;&lt;P&gt;check if the third field is "y'.&lt;/P&gt;&lt;P&gt;then read the same internal tabel with third field eq 'N'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;append it to the new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at Itab into workarea.&lt;/P&gt;&lt;P&gt;if thirdfield eq 'Y'.&lt;/P&gt;&lt;P&gt;read Itab into workarea2 with key matnr plant thirdfield eq 'N'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;append workarea to new internal table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear workarea1.workarea2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Javed Parvez on Jan 18, 2010 9:19 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 08:18:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468139#M1416794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-18T08:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468140#M1416795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please paste the code which solved your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 09:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manipulating-internal-table/m-p/6468140#M1416795</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-18T09:57:37Z</dc:date>
    </item>
  </channel>
</rss>

