<?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 error loop and work area in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753174#M1774398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;hi&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;all&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;please&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;help&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;me&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in trouble,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;get the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;error&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;message&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is "you may not delete or overwrite table "t_bseg" within a loop over itself.-" AND&amp;nbsp; the work area "t_bseg" has more fields than selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I created&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the following&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;syntax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;lt;removed the code snippet&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;PH.&lt;/P&gt;&lt;P&gt;THX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Moderator message - Please post only the relevant portion of the code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suhas Saha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 09:47:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-09-25T09:47:07Z</dc:date>
    <item>
      <title>error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753174#M1774398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;hi&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;all&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;please&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;help&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;me&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in trouble,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;get the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;error&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;message&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is "you may not delete or overwrite table "t_bseg" within a loop over itself.-" AND&amp;nbsp; the work area "t_bseg" has more fields than selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I created&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the following&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;syntax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;lt;removed the code snippet&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;PH.&lt;/P&gt;&lt;P&gt;THX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Moderator message - Please post only the relevant portion of the code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suhas Saha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 09:47:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753174#M1774398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-25T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753175#M1774399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Putra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;the work area "t_bseg" has more fields than selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because the work area has more than the fields that you are selecting.&lt;/P&gt;&lt;P&gt;Ex: If work area has 5 fields and in the select statement if you are fetching less than 5 fields, then this error is raised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't understand the first error. Provide the code that gives error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish D R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753175#M1774399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-25T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753176#M1774400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it an error or warning?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:11:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753176#M1774400</guid>
      <dc:creator>Arun_Prabhu_K</dc:creator>
      <dc:date>2013-09-25T10:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753177#M1774401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't delete a table whilst looping through it. If you want to delete an entire table do so outside the loop. If you want to delete a single row within the loop do so using INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add a flag to tour table and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_BSEG.&lt;/P&gt;&lt;P&gt;IF xxxxxx.&lt;/P&gt;&lt;P&gt;T_BSEG-FLAG = 'X'.&lt;/P&gt;&lt;P&gt;MODIFY T_BSEG INDEX SY-TABIX TRANSPORTING FLAG..&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE T_BSEG WHERE FLAG = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753177#M1774401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-25T10:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753178#M1774402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are looping an &lt;STRONG&gt;itab&lt;/STRONG&gt;, automatically index handling of that &lt;STRONG&gt;itab&lt;/STRONG&gt; will be taken care off.&lt;/P&gt;&lt;P&gt;No need to mention &lt;STRONG&gt;INDEX sy-tabix&lt;/STRONG&gt; inside the loop.&lt;/P&gt;&lt;P&gt;Also if you use the statement &lt;STRONG&gt;delete itab&lt;/STRONG&gt; inside the loop, that particular record from itab will be deleted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753178#M1774402</guid>
      <dc:creator>Arun_Prabhu_K</dc:creator>
      <dc:date>2013-09-25T10:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: error loop and work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753179#M1774403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You cannot delete an internal table while its in use.&lt;/P&gt;&lt;P&gt;place the delete statement after your loop i.e after ENDLOOP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And second problem of table having more fields than selected is a warning, you can ignore it if you want or if you want it not to be raised every time you syntax check, create a local type with only the required fields and use it for declaration of your internal 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;Ashish Rawat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 11:49:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-loop-and-work-area/m-p/9753179#M1774403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-25T11:49:29Z</dc:date>
    </item>
  </channel>
</rss>

