<?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: Doubt in loop.......endloop  and Read.......... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831691#M921364</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;Your TL is absolutely correct.&lt;/P&gt;&lt;P&gt;1. No need of checking whether field-symbol is assigned or not, since the control will get inside LOOP only if data is thr in internal table and if data is thr field-symbol will be assgined...i.e. it will defintely point to the corresponding entry in internal table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If field symbol is not assigned then sy-subrc will not be 0. No way it will be 0 even if field-symbol is not assigned....only if condition are met then only field-symbol will get assigned.....So here also no need of checking whether field-symbol is assigned or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful....&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ABAPer 007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ABAPer 007 on May 9, 2008 11:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2008 05:31:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-09T05:31:00Z</dc:date>
    <item>
      <title>Doubt in loop.......endloop  and Read..........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831690#M921363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      the current syntax  we are using for looping a internal table is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. loop at itab&lt;/P&gt;&lt;P&gt;  assigning &amp;lt;fs_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &amp;lt;fs_itab&amp;gt; is assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..................................&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;endloop.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My TL suggested me that if the field symbol is not  assigned then it will not move into the loop. So there is no need for checking if the field symbol is assiged or not. I am not sure please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. One more question current read syntax we are using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    read itab assigning &amp;lt;fs_itab&amp;gt;............&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;         if &amp;lt;fs_itab&amp;gt; is assigned.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of checking if the field symbol is assigned can check the sy-subrc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will there be any case in which even if the field symbol is not assigned there is chance of sy-subrc eq 0. Please suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 05:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831690#M921363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T05:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in loop.......endloop  and Read..........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831691#M921364</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;Your TL is absolutely correct.&lt;/P&gt;&lt;P&gt;1. No need of checking whether field-symbol is assigned or not, since the control will get inside LOOP only if data is thr in internal table and if data is thr field-symbol will be assgined...i.e. it will defintely point to the corresponding entry in internal table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If field symbol is not assigned then sy-subrc will not be 0. No way it will be 0 even if field-symbol is not assigned....only if condition are met then only field-symbol will get assigned.....So here also no need of checking whether field-symbol is assigned or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful....&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ABAPer 007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ABAPer 007 on May 9, 2008 11:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 05:31:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831691#M921364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T05:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in loop.......endloop  and Read..........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831692#M921365</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;For ur first question field symbol check is not required as the field symbol will get assigned only if the itab contains the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for ur second question, it is better to check with SY-SUBRC as the field symbol always contains the data of the internal table for every iteration. It could be a problem if  u r reading the data with some where clause as the the field symbol will not get refreshed and contains the previous record data irrelevent to the success of the READ statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to perform some operation only if the read statement is successfull. If u r using READ statment then it is always better to use SY-SUBRC instead of checking with destination one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if this is helpful for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrasekhar K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 07:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831692#M921365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T07:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in loop.......endloop  and Read..........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831693#M921366</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. No need to check whether &amp;lt;fs_itab&amp;gt; is assigned becoz the loop is entered only if  there is a matching record in case you have given any condition or incase the table is not empty. If the table is empty, it will not enter the loop at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. It is alwasy better to use the check of sy-subrc = 0 when u perfiorm read.... Also befor you read ur internal table clear the header of the internal table so that no wrong data is picked.. it happens sometimes that the old record remains in the header if u do not clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u.&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 08:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-loop-endloop-and-read/m-p/3831693#M921366</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2008-05-09T08:34:33Z</dc:date>
    </item>
  </channel>
</rss>

