<?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 Runtime error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678215#M299056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You attempted to change, delete or create a line in the        &lt;/P&gt;&lt;P&gt;internal table "ITAB1", but no valid cursor exists             &lt;/P&gt;&lt;P&gt;for the table.                                                 &lt;/P&gt;&lt;P&gt;Possible reasons:                                              &lt;/P&gt;&lt;P&gt;1. The relevant ABAP/4 statement does not include the addition &lt;/P&gt;&lt;P&gt;   "...INDEX...", although the statement is not                &lt;/P&gt;&lt;P&gt;   inside a "LOOP...ENDLOOP" loop processing this table.       &lt;/P&gt;&lt;P&gt;2. The relevant ABAP/4 statement was called from within a      &lt;/P&gt;&lt;P&gt;   "LOOP...ENDLOOP" loop after a DELETE "ITAB1".               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dear all,i get the above runtime errors....the coding works fine if i enter more than 2 matnr but if i enter only 1 matnr in the selectin screen,problem occur..any idea? thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Nov 2006 04:02:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-21T04:02:30Z</dc:date>
    <item>
      <title>Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678215#M299056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You attempted to change, delete or create a line in the        &lt;/P&gt;&lt;P&gt;internal table "ITAB1", but no valid cursor exists             &lt;/P&gt;&lt;P&gt;for the table.                                                 &lt;/P&gt;&lt;P&gt;Possible reasons:                                              &lt;/P&gt;&lt;P&gt;1. The relevant ABAP/4 statement does not include the addition &lt;/P&gt;&lt;P&gt;   "...INDEX...", although the statement is not                &lt;/P&gt;&lt;P&gt;   inside a "LOOP...ENDLOOP" loop processing this table.       &lt;/P&gt;&lt;P&gt;2. The relevant ABAP/4 statement was called from within a      &lt;/P&gt;&lt;P&gt;   "LOOP...ENDLOOP" loop after a DELETE "ITAB1".               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dear all,i get the above runtime errors....the coding works fine if i enter more than 2 matnr but if i enter only 1 matnr in the selectin screen,problem occur..any idea? thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678215#M299056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678216#M299057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use an index while deleting an entry inside a loop. You can use sy-tabix value for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;&lt;P&gt;PS:Reward points if this is helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:04:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678216#M299057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678217#M299058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you a DELETE statement and after that you are updating the internal table and that row is already deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post you code here and the data with which the loop is getting executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can execute the code debug mode, you will understand what I am saying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note - Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678217#M299058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678218#M299059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ARE U USING INDEX OPTION FOR READING OR MODIFYING THE INTERNALL TABLE ? PROBABLY INDEX IS GETTING THE VALUE 0. PLS CHECK THAT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678218#M299059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678219#M299060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the dump, there will be a source code extract. Would you post that portion please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:05:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678219#M299060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678220#M299061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hei guys,below are the portion of code which get error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this segment of code are in a loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT ITAB3 WHERE MATNR = ITAB1-MATNR&lt;/P&gt;&lt;P&gt;                    AND IND2   = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR: MONTH, YEAR, DATE3.&lt;/P&gt;&lt;P&gt;      YEAR = ITAB3-BUDAT&lt;EM&gt;0(4). MONTH = ITAB3-BUDAT&lt;/EM&gt;4(2).&lt;/P&gt;&lt;P&gt;      CONCATENATE YEAR MONTH INTO DATE3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF DATE1 = DATE3.&lt;/P&gt;&lt;P&gt;         IF ITAB1-BUDAT3 IS INITIAL.&lt;/P&gt;&lt;P&gt;            IF ITAB3-BWART = '312'.   " mseg-shzkg = H&lt;/P&gt;&lt;P&gt;               ITAB3-MENGE = ITAB3-MENGE * -1.&lt;/P&gt;&lt;P&gt;            IF ITAB3-BWART = '412'.    " mseg-shzkg = H&lt;/P&gt;&lt;P&gt;               ITAB3-MENGE = ITAB3-MENGE * -1.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ITAB1-BUDAT3 = ITAB3-BUDAT.&lt;/P&gt;&lt;P&gt;            ITAB1-MBLNR3 = ITAB3-MBLNR.&lt;/P&gt;&lt;P&gt;            ITAB1-ZEILE3 = ITAB3-ZEILE.&lt;/P&gt;&lt;P&gt;            ITAB1-MENGE3 = ITAB3-MENGE.&lt;/P&gt;&lt;P&gt;            ITAB1-MEINS3 = ITAB3-MEINS.&lt;/P&gt;&lt;P&gt;            ITAB1-BKTXT3 = ITAB3-BKTXT.&lt;/P&gt;&lt;P&gt;            ITAB3-IND2   = 'U'.&lt;/P&gt;&lt;P&gt;            MODIFY ITAB1. MODIFY ITAB3.&lt;/P&gt;&lt;P&gt;            EXIT.&lt;/P&gt;&lt;P&gt;         ENDIF.&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;error occurs at the "MODIFY ITAB1. MODIFY ITAB3."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:14:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678220#M299061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678221#M299062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can't modify itab in the loop on itab3 without specifying an index. If the tables have the same number of entries you can try:&lt;/P&gt;&lt;P&gt;MODIFY ITAB1  index sy-tabix. MODIFY ITAB3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;otherwise you'll have to read itab1 to find the matching entry and then change it:&lt;/P&gt;&lt;P&gt;read table itab1 with key ???&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;modify itab1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:17:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678221#M299062</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-11-21T04:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678222#M299063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hie neil, i tried using tat..it oso gimme errors..b4 this segment of code,there;s another similar codes..n tat part of codes works fine..juz this segment alone causing errors&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678222#M299063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678223#M299064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't modify ITAB1 inside a loop of ITAB3. Modify ITAB3 inside the loop and you need to have index for the internal table ITAB1 for which you have ITAB1-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB3 WHERE MATNR = ITAB1-MATNR&lt;/P&gt;&lt;P&gt;AND IND2 = ' '.&lt;/P&gt;&lt;P&gt;.....&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;MODIFY ITAB1.  (comment this statement here and modify ITAB1 outside the loop with index statement as in this loop there might be multiple values of ITAB3-MATNR based on ITAB1-MATNR)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY ITAB3.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Also can u provide the code how r u getting ITAB1-MATNR also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678223#M299064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T04:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678224#M299065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the error will happen whenever you try to 'update itab1' inside the itab3 loop. But sometimes because of the 'ifs' it will not actually go through the modify and so no dump will occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just noticed an error in my previous code:&lt;/P&gt;&lt;P&gt;read table itab1 with key ???&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;modify itab1 index sy-tabix.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 04:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678224#M299065</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-11-21T04:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678225#M299066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guys..thx for all the infor&lt;/P&gt;&lt;P&gt;i manage to solve it d...it seems tat it is fine to use modify itab1 n itab3 inside d loop itself..juz tat my program got error bcoz i mis put the endloop somewhere..thx again ^^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 05:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/1678225#M299066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T05:27:04Z</dc:date>
    </item>
  </channel>
</rss>

