<?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: Looping issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768494#M332015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U cud try the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;  loop at i_jest where objnr = wa_aufk-objnr  &lt;/P&gt;&lt;P&gt;    i_jest1-objnr = i_jest-objnr.&lt;/P&gt;&lt;P&gt;    i_jest1-stat = i_jest-stat.&lt;/P&gt;&lt;P&gt;    i_jest1- inact = i_jest- inact.&lt;/P&gt;&lt;P&gt;    append i_jest1.&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;Regards,&lt;/P&gt;&lt;P&gt;Johnson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2007 05:26:51 GMT</pubDate>
    <dc:creator>former_member215243</dc:creator>
    <dc:date>2007-01-03T05:26:51Z</dc:date>
    <item>
      <title>Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768483#M332004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i use the following code, i am unable to append the data in the internal Table i_jest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is getting over written each time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;  select objnr stat inact from JEST into corresponding fields of table i_jest&lt;/P&gt;&lt;P&gt;  where objnr = wa_aufk-objnr&lt;/P&gt;&lt;P&gt;  and inact = 'X'.&lt;/P&gt;&lt;P&gt;  append i_jest.&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;I would like to get the data from table JEST and store it in i_jest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the defect in above code and why data is not getting appended in the internal table i_jest..?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each time, there will be 3-4 lines get stored in the internal Table.&lt;/P&gt;&lt;P&gt;Very next loop, the data is getting overwritten in the internal Table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768483#M332004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768484#M332005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove append statement in the loop ..then it will work..as u r using clause into corresponding fields of table..u need not to use append..remove that.&lt;/P&gt;&lt;P&gt;amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768484#M332005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768485#M332006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;select objnr stat inact from JEST into corresponding fields of table i_jest&lt;/P&gt;&lt;P&gt;where objnr = wa_aufk-objnr&lt;/P&gt;&lt;P&gt;and inact = 'X'.&lt;/P&gt;&lt;P&gt;*&amp;lt;b&amp;gt;append i_jest.&amp;lt;/b&amp;gt;------&amp;gt;remove this.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768485#M332006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768486#M332007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;select &amp;lt;you may use single &amp;gt; objnr stat inact from JEST into corresponding fields of  i_jest&lt;/P&gt;&lt;P&gt;where objnr = wa_aufk-objnr&lt;/P&gt;&lt;P&gt;and inact = 'X'.&lt;/P&gt;&lt;P&gt;append i_jest.&lt;/P&gt;&lt;P&gt;&amp;lt;endselect if you are not using select single&amp;gt;.&lt;/P&gt;&lt;P&gt;&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;dont use table option in select qery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that only it has overwritten.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768486#M332007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768487#M332008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Try the code by removing append statement. It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768487#M332008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768488#M332009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit/Kishan/Shiba and Priyanka...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your tips....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the following code... Now data is appending in a desired manner..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************&lt;/P&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select objnr stat inact from JEST into corresponding fields of i_jest&lt;/P&gt;&lt;P&gt;  where objnr = wa_aufk-objnr&lt;/P&gt;&lt;P&gt;  and inact = 'X'.&lt;/P&gt;&lt;P&gt;  append i_jest.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&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;I have removed append statement as stated by you previously.. But it didn't work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, Thanks dear friends.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768488#M332009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768489#M332010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the append statement and use &lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;appending&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;  keyword in the select statement before &amp;lt;b&amp;gt;table&amp;lt;/b&amp;gt; keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Reddy G&lt;/P&gt;&lt;P&gt;***Rewards if answers are helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768489#M332010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768490#M332011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;always avoidf to use select statement with in a loop. try to code like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make one more internal table i_jest1 like i_jest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select objnr stat inact from JEST into corresponding fields of table i_jest
where  inact = 'X'.

sort i_jest.
 loop at i_aufk into wa_aufk.
read table i_jest with key objnr = wa_aufk-objnr binary search.
i_jest1-objnr = i_jest-objnr.
i_jest1-stat = i_jest-stat.
i_jest1- inact = i_jest- inact.
append i_jest1.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 04:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768490#M332011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T04:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768491#M332012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the code as you mentioned...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i am having one more query...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have multiple records in I_JEST for i_jest-objnr.&lt;/P&gt;&lt;P&gt;I mean to say.... i_jest-objnr = 100, i_jest-stat = I001, i_jest-inact= X&lt;/P&gt;&lt;P&gt;                        i_jest-objnr = 100, i_jest-stat = I002, i_jest-inact= X&lt;/P&gt;&lt;P&gt;                        i_jest-objnr = 100, i_jest-stat = I005, i_jest-inact= X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       i_jest-objnr = 101, i_jest-stat = I001, i_jest-inact= X&lt;/P&gt;&lt;P&gt;                       i_jest-objnr = 101, i_jest-stat = I003, i_jest-inact= X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The read statment only reads single line (i_jest-objnr= 100) and skips rest records..&lt;/P&gt;&lt;P&gt;It will move to i_jest-objnr= 101&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need all the records for i_jest-objnr= 100.. (all 3 lines)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to tackle this issue...???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768491#M332012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768492#M332013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again one more query has been posted.. Hence this issue is still open... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768492#M332013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768493#M332014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1)use  for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select objnr stat inact from JEST into  table i_jest
for all entries in i_aufk 
where objnr = i_aufk-objnr
and  inact = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) otherwise  u can use join fro both table&lt;/P&gt;&lt;P&gt;3)and  last and performance wise poor option is to use nested loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objnr stat inact from JEST into corresponding fields of table i_jest&lt;/P&gt;&lt;P&gt;where  inact = 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort i_jest.&lt;/P&gt;&lt;P&gt; loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;loop at i_jest where objnr = wa_aufk-objnr.&lt;/P&gt;&lt;P&gt;i_jest1-objnr = i_jest-objnr.&lt;/P&gt;&lt;P&gt;i_jest1-stat = i_jest-stat.&lt;/P&gt;&lt;P&gt;i_jest1- inact = i_jest- inact.&lt;/P&gt;&lt;P&gt;append i_jest1.&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;kishan negi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kishan negi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768493#M332014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768494#M332015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U cud try the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;  loop at i_jest where objnr = wa_aufk-objnr  &lt;/P&gt;&lt;P&gt;    i_jest1-objnr = i_jest-objnr.&lt;/P&gt;&lt;P&gt;    i_jest1-stat = i_jest-stat.&lt;/P&gt;&lt;P&gt;    i_jest1- inact = i_jest- inact.&lt;/P&gt;&lt;P&gt;    append i_jest1.&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;Regards,&lt;/P&gt;&lt;P&gt;Johnson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:26:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768494#M332015</guid>
      <dc:creator>former_member215243</dc:creator>
      <dc:date>2007-01-03T05:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768495#M332016</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;select objnr stat inact from JEST into corresponding fields of table i_jest&lt;/P&gt;&lt;P&gt;where  inact = 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort i_jest.&lt;/P&gt;&lt;P&gt; loop at i_aufk into wa_aufk.&lt;/P&gt;&lt;P&gt;loop at i_jest where objnr = wa_aufk-objnr .&lt;/P&gt;&lt;P&gt;i_jest1-objnr = i_jest-objnr.&lt;/P&gt;&lt;P&gt;i_jest1-stat = i_jest-stat.&lt;/P&gt;&lt;P&gt;i_jest1- inact = i_jest- inact.&lt;/P&gt;&lt;P&gt;append i_jest1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768495#M332016</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-01-03T05:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768496#M332017</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;Another option is to use for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objnr stat inact from JEST into corresponding fields of table i_jest&lt;/P&gt;&lt;P&gt;for all entries in i_aufk&lt;/P&gt;&lt;P&gt;where objnr = i_aufk-objnr&lt;/P&gt;&lt;P&gt;and inact = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768496#M332017</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-01-03T05:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768497#M332018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan, &lt;/P&gt;&lt;P&gt;  The reason why you are getting onlye few records in the final internal table is that each time you do into table the previous contents gets replaced with the new set of values.&lt;/P&gt;&lt;P&gt;So there are two alternatives i would like to suggest . &lt;/P&gt;&lt;P&gt;1. If first three fields of your internal table i_jest are &amp;lt;b&amp;gt;objnr stat inact&amp;lt;/b&amp;gt;  , the you can use the command appending table in the select statement , but please do remeber that the fields must be in the order said else program will not work , i am sure whether this will work with the addition into corresponding fields. Below given is a sample code to illustrate this statement &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Types : Begin of ty_one ,
          matnr type matnr ,
          werks type werks_d ,
        End of ty_one.
Types : Begin of ty_two ,
          matnr type matnr ,
         End of ty_two.

data : it_one type table of ty_one ,
       it_two type table of ty_two ,
       wa_two type ty_two.

Start-of-selection.

Select matnr
up to 10 rows
into table it_two
from mara.


loop at it_two into wa_two .

select matnr werks   " Please refer to the sequence in internal table
from marc
appending table it_one
where matnr =  wa_two-matnr
.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. The second options is to select the data into a temp table and the append the lines into the final table.&lt;/P&gt;&lt;P&gt;the code would look like this &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_aufk into wa_aufk.
select objnr stat inact from JEST into corresponding fields of table i_jest1 " i_jest1 is temp table
where objnr = wa_aufk-objnr
and inact = 'X'.
*append i_jest. "code commented
append lines of i_jest1 to i_jest ." code added 
refresh i_jest1." code added.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i feel options 2 will be better for you.&lt;/P&gt;&lt;P&gt;Please do revert back in case of any further queries.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Assign point if reply is useful&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:37:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768497#M332018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768498#M332019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's no point in using the APPEND I_JEST statement.&lt;/P&gt;&lt;P&gt;Please remove it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't forget to award Points *&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="36" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/1768498#M332019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:40:59Z</dc:date>
    </item>
  </channel>
</rss>

