<?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: Fetch next cursor/ invalid database interruption in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243061#M1012720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay, let's continue in [this thread of yours|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="995261"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2008 14:24:13 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2008-08-06T14:24:13Z</dc:date>
    <item>
      <title>Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243055#M1012714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate your help for the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to develope something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OPEN CURSOR ... WITH HOLD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;FETCH ... PACKAGE SIZE ... into lt_names&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;insert table ZZ_XXXX ... from lt_names&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;commit work&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the second loop, the FETCH dumps raising the runtime error "Invalid interruption of a database selection"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Runtime Error          DBIF_RSQL_INVALID_CURSOR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception              CX_SY_OPEN_SQL_DB&lt;/STRONG&gt;       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cursor is opened "with hold".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know, why does it dump?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;marmsg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243055#M1012714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243056#M1012715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem is causing by &lt;STRONG&gt;insert table ZZ_XXXX&lt;/STRONG&gt;  statement please make sure insert is not suppose to insert duplicate key entries which already exist in ZZ_XXXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243056#M1012715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243057#M1012716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer, but the dump is when the FETCH is executed, not in the insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have realized, that sometimes, it dumps even in the FIRST FETCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;marmsg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243057#M1012716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243058#M1012717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COMMIT WORK resets the database cursor, so the next fetch does not "know" any more where the last one has left off.&lt;/P&gt;&lt;P&gt;Replace the COMMIT WORK with a call to function DB_COMMIT.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243058#M1012717</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-08-04T13:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243059#M1012718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that was the problem. Thank you very much &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;marmsg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 14:47:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243059#M1012718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T14:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243060#M1012719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have four entires in a custom z-table. During FETCH Statements, I use, PACKET SIZE, of 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rough code is as follows:&lt;/P&gt;&lt;P&gt;OPEN CURSOR WITH HOLD w_dbcur1 FOR&lt;/P&gt;&lt;P&gt;SELECT * FROM ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FETCH NEXT CURSOR w_dbcur1 INTO TABLE i_notes PACKAGE SIZE p_pack. "Here packet size is of 2&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;Calling some X BAPI Function module.&lt;/P&gt;&lt;P&gt;Calling BAPI_TRANSACTION_COMMIT Function module.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE CURSOR w_dbcur1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the problem is, if I give packet size as 30,000, then program is working fine. If I am giving packet size as 2, which less than 4 entries in the table, The program dumps either at first execution of FETCH NEXT CURSOR statement or at the second time of FETCH NEXT CURSOR. Can you provide exact solution for this, and not the links please. Rewards will be provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vijayanand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 14:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243060#M1012719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-06T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch next cursor/ invalid database interruption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243061#M1012720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay, let's continue in [this thread of yours|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="995261"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 14:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-next-cursor-invalid-database-interruption/m-p/4243061#M1012720</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-08-06T14:24:13Z</dc:date>
    </item>
  </channel>
</rss>

