<?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: Fetch records from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566264#M858244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT WA_ITAB_ISEG.&lt;/P&gt;&lt;P&gt;loop at itab_err INTO ITAB_DEL&lt;/P&gt;&lt;P&gt;where ZWERKS WA_ITAB_ISEG-WERKS&lt;/P&gt;&lt;P&gt;and ZLDAT WA_ITAB_ISEG-ZLDAT&lt;/P&gt;&lt;P&gt;and ZBLDAT WA_ITAB_ISEG-BUDAT&lt;/P&gt;&lt;P&gt;and ZMATNR1 WA_ITAB_ISEG-MATNR&lt;/P&gt;&lt;P&gt;and ZCHARG1 WA_ITAB_ISEG-CHARG&lt;/P&gt;&lt;P&gt;and ZLGORT WA_ITAB_ISEG-LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab_err FROM  ITAB_DEL.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the itab_err will contains only the records which you  required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 02:39:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-20T02:39:38Z</dc:date>
    <item>
      <title>Fetch records from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566261#M858241</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 ONE INTERNAL TABLE ITAB_ERR. THIS HAS RECORDS AND I AM FETCHING DATA FROM ISEG AS WELL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHAT I WANT IS I NEED TO FETCH THE RECORDS FROM &lt;/P&gt;&lt;P&gt;ITAB_ERR WHOSE RECORDS DO NOT MATCH WITH ISEG TABLE RECORDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I HAVE WRITTEN FOLLOWING CODE BUT IT DOES NOT FETCH THE RECORDS FROM ITAB_ERR THAT DOES NOT MATCH WITH ISEG RECORDS i.e. ITAB_ERR HAS SOME RECORDS WHICH ARE NOT THERE IN ISEG AND I NEED TO FETCH THOSE RECORDS FROM ITAB_ERR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLEASE LOOK AT MY CODE AND CORRECT OR SUGGEST CORRECTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_ERR[] = ITAB_UPD[].  (ITAB_ERR HAS RECORDS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT *&lt;/P&gt;&lt;P&gt;      FROM ISEG INTO CORRESPONDING FIELDS OF TABLE WA_ITAB_ISEG&lt;/P&gt;&lt;P&gt;      where werks eq zptf_phyinv_hed-zwerks and zldat eq itab-zldat and budat eq itab-zbldat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WA_ITAB_ISEG HAS RECORDS.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear sy-subrc.&lt;/P&gt;&lt;P&gt;sort itab_err by zmatnr1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT WA_ITAB_ISEG.&lt;/P&gt;&lt;P&gt;      loop at itab_err INTO ITAB_DEL&lt;/P&gt;&lt;P&gt;      where ZWERKS &amp;lt;&amp;gt; WA_ITAB_ISEG-WERKS&lt;/P&gt;&lt;P&gt;                          and ZLDAT  &amp;lt;&amp;gt; WA_ITAB_ISEG-ZLDAT&lt;/P&gt;&lt;P&gt;                          and ZBLDAT &amp;lt;&amp;gt; WA_ITAB_ISEG-BUDAT&lt;/P&gt;&lt;P&gt;                          and ZMATNR1 &amp;lt;&amp;gt; WA_ITAB_ISEG-MATNR&lt;/P&gt;&lt;P&gt;                          and ZCHARG1 &amp;lt;&amp;gt; WA_ITAB_ISEG-CHARG&lt;/P&gt;&lt;P&gt;                          and ZLGORT  &amp;lt;&amp;gt; WA_ITAB_ISEG-LGORT.&lt;/P&gt;&lt;P&gt;      IF SY-subrc = 0.&lt;/P&gt;&lt;P&gt;      move-corresponding ITAB_err to itab_del2.&lt;/P&gt;&lt;P&gt;      append itab_del2.&lt;/P&gt;&lt;P&gt;      CLEAR SY-SUBRC.&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;THANX &lt;/P&gt;&lt;P&gt;ROCKY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 19, 2008 7:04 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 11:35:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566261#M858241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T11:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch records from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566262#M858242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;during selection in where condition u have compared using internal table. Compare using work Area Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, You have looped at work-area but i think loop is possible on internal table to workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thirdly, Dont' use loop within a loop.(performance Issue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sandipan ghosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 11:44:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566262#M858242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T11:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch records from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566263#M858243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write the coding as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB_ERR.&lt;/P&gt;&lt;P&gt;  READ TABLE WA_ITAB_ISEG with key &lt;/P&gt;&lt;P&gt;            ZWERKS = ITAB_ERR-WERKS.&lt;/P&gt;&lt;P&gt;  If sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     itab_err1 = ITAB_ERR.&lt;/P&gt;&lt;P&gt;     append itab_err1.&lt;/P&gt;&lt;P&gt;  Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 11:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566263#M858243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T11:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch records from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566264#M858244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT WA_ITAB_ISEG.&lt;/P&gt;&lt;P&gt;loop at itab_err INTO ITAB_DEL&lt;/P&gt;&lt;P&gt;where ZWERKS WA_ITAB_ISEG-WERKS&lt;/P&gt;&lt;P&gt;and ZLDAT WA_ITAB_ISEG-ZLDAT&lt;/P&gt;&lt;P&gt;and ZBLDAT WA_ITAB_ISEG-BUDAT&lt;/P&gt;&lt;P&gt;and ZMATNR1 WA_ITAB_ISEG-MATNR&lt;/P&gt;&lt;P&gt;and ZCHARG1 WA_ITAB_ISEG-CHARG&lt;/P&gt;&lt;P&gt;and ZLGORT WA_ITAB_ISEG-LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab_err FROM  ITAB_DEL.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the itab_err will contains only the records which you  required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 02:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566264#M858244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T02:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch records from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566265#M858245</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; LOOP AT WA_ITAB_ISEG.&lt;/P&gt;&lt;P&gt;    loop at itab_err INTO ITAB_DEL&lt;/P&gt;&lt;P&gt;       where ZWERKS WA_ITAB_ISEG-WERKS&lt;/P&gt;&lt;P&gt;        and ZLDAT WA_ITAB_ISEG-ZLDAT&lt;/P&gt;&lt;P&gt;        and ZBLDAT WA_ITAB_ISEG-BUDAT&lt;/P&gt;&lt;P&gt;        and ZMATNR1 WA_ITAB_ISEG-MATNR&lt;/P&gt;&lt;P&gt;        and ZCHARG1 WA_ITAB_ISEG-CHARG&lt;/P&gt;&lt;P&gt;        and ZLGORT WA_ITAB_ISEG-LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       move-corresponding &lt;STRONG&gt;ITAB_DEL&lt;/STRONG&gt; to itab_del2.&lt;/P&gt;&lt;P&gt;       append itab_del2.&lt;/P&gt;&lt;P&gt;&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;No need of SY-SUBRC if condition satisfies then only cursor enter into loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 02:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-records-from-internal-table/m-p/3566265#M858245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T02:47:12Z</dc:date>
    </item>
  </channel>
</rss>

