<?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: Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358215#M1400020</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;before using for all entries first use if condition Eg .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ifi tab1[] is not initial.

select field from table 
INTO CORRESPONDING FIELDS OF TABLE  itba2
FOR ALL ENTRIES IN itab1
where field = itab1-field. 
endif. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope its helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Abhilash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 05 Dec 2009 06:36:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-05T06:36:08Z</dc:date>
    <item>
      <title>Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358206#M1400011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all Pandits,&lt;/P&gt;&lt;P&gt;I have an internal table 'itab1' containing a field 'field'. &lt;/P&gt;&lt;P&gt;I want to fill another internal table 'itab2' containing same 'field' from a 'dbtable'.  &lt;/P&gt;&lt;P&gt;Now I want to use 'For All Entries' when fetch itab2 as it dbtable has got so many entries comparing that field &amp;lt;&amp;gt; itab1-field.&lt;/P&gt;&lt;P&gt;Concern is, when I am doing this I am getting, Iam not getting the required records, instead all the records from dbtable are coming. Why?&lt;/P&gt;&lt;P&gt;Can any pandit help me out here or can provide another way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vaibhav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 13:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358206#M1400011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358207#M1400012</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;First check the field is value in Itab1 is it same as u r expecting.And try to use the max keys when u r fetching the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358207#M1400012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T14:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358208#M1400013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you check if table1 is empty? FOR ALL ENTRIES IN itab returns all rows in the FROM table when itab is empty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358208#M1400013</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2009-12-04T14:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358209#M1400014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Raghu,&lt;/P&gt;&lt;P&gt;I have checked the field value, itab1 is sorted. I am using keys. So everything as already taken care except the right one which willhelp to resolve my bizarre issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358209#M1400014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T14:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358210#M1400015</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;Before using FOR ALL ENTRIES you should check itab1 whether it is initial or not.&lt;/P&gt;&lt;P&gt;If you have not done this check and if no matching record is found in dbtable then all the records from Database Table are retrieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;lakshman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358210#M1400015</guid>
      <dc:creator>former_member209217</dc:creator>
      <dc:date>2009-12-04T14:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358211#M1400016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES ALL,&lt;/P&gt;&lt;P&gt;I have checked itab1 has got the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358211#M1400016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T14:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358212#M1400017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can u tell whcih tables u r refering.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358212#M1400017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358213#M1400018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghav,&lt;/P&gt;&lt;P&gt;I am using all Z tables.&lt;/P&gt;&lt;P&gt;Issue is coming when I using '&amp;lt;&amp;gt;' operator with 'For All Entries'. But when I use '=', its giving the excact values which I require.&lt;/P&gt;&lt;P&gt;Can u pz check if even u are facing the same issue with '&amp;lt;&amp;gt;' operator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vaibhav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358213#M1400018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-04T14:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358214#M1400019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please copy here part of your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- data declaration of your internal tables&lt;/P&gt;&lt;P&gt;2- SQL where you fetch data for itab1&lt;/P&gt;&lt;P&gt;3- SQL where you fetch data for itab2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot see any operator between your ''... and I think FAE conditions must be all equal ("=")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 14:12:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358214#M1400019</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2009-12-04T14:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358215#M1400020</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;before using for all entries first use if condition Eg .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ifi tab1[] is not initial.

select field from table 
INTO CORRESPONDING FIELDS OF TABLE  itba2
FOR ALL ENTRIES IN itab1
where field = itab1-field. 
endif. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope its helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Abhilash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2009 06:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358215#M1400020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-05T06:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358216#M1400021</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;Make sure of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Internal table 1 has values, else the result of select query will be all the records from database table.&lt;/P&gt;&lt;P&gt;2.The sequence of fields in Select query and the internal table2 should be the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inttab1-field1, inttab2 --field1, dbtable-field1 are of same datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not inttab1[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select field1&lt;/P&gt;&lt;P&gt;    from dbtable&lt;/P&gt;&lt;P&gt;   into table inttab2&lt;/P&gt;&lt;P&gt;  for all entries in inttab1&lt;/P&gt;&lt;P&gt; where field1 = inttab1-field1.&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;Regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 09:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358216#M1400021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-20T09:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358217#M1400022</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 paste your code for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 09:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358217#M1400022</guid>
      <dc:creator>Harsh_Bansal</dc:creator>
      <dc:date>2012-02-20T09:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358218#M1400023</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;IF ITAB1[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT FIELD FROM DBTABLE INTO CORRESPONDING FIELDS &lt;/P&gt;&lt;P&gt;             OF TABLE ITAB2 FOR ALL ENTRIES IN ITAB1 WHERE FIELD1 = ITAB1-FIELD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 09:52:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6358218#M1400023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-20T09:52:49Z</dc:date>
    </item>
  </channel>
</rss>

