<?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 DBSQL_INVALID_CURSOR (Cursor already closed or not open yet) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-dbsql-invalid-cursor-cursor-already-closed-or-not-open-yet/m-p/12474914#M2001348</link>
    <description>&lt;P&gt;Hello Friends,&lt;/P&gt;
  &lt;P&gt;I am receiving runtime error as " Cursor already closed or not open yet." for the below piece of code.&lt;/P&gt;
  &lt;P&gt;So, can anyone please help me how to solve it?&lt;/P&gt;
  &lt;P&gt;I have tried DB_COMMIT FM for commit work and also without it, still the same dump occurs.&lt;/P&gt;
  &lt;P&gt;data: gv_cursor TYPE cursor.&lt;/P&gt;
  &lt;P&gt; OPEN CURSOR WITH HOLD gv_cursor&lt;/P&gt;
  &lt;P&gt; FOR SELECT&lt;BR /&gt; erdk~opbel&lt;BR /&gt; fkkvkp~ktokl&lt;BR /&gt; FROM erdk AS erdk&lt;BR /&gt; INNER JOIN fkkvkp AS fkkvkp&lt;BR /&gt; ON fkkvkp~vkont = erdk~vkont&lt;BR /&gt; WHERE erdk~opbel IN s_prtdoc. &lt;/P&gt;
  &lt;P&gt;DO.&lt;/P&gt;
  &lt;P&gt; FETCH NEXT CURSOR gv_cursor&lt;BR /&gt; INTO TABLE gt_input&lt;BR /&gt; PACKAGE SIZE 1000.&lt;BR /&gt; IF sy-subrc IS INITIAL.&lt;BR /&gt; SORT gt_input BY opbel. &lt;BR /&gt; ELSE.&lt;BR /&gt; CLOSE CURSOR gv_cursor.&lt;BR /&gt; EXIT.&lt;BR /&gt; ENDIF. &lt;/P&gt;
  &lt;P&gt;****Some other logics is implemented below.&lt;/P&gt;
  &lt;P&gt;ENDDO.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Feb 2022 15:42:11 GMT</pubDate>
    <dc:creator>former_member651247</dc:creator>
    <dc:date>2022-02-05T15:42:11Z</dc:date>
    <item>
      <title>Runtime Error DBSQL_INVALID_CURSOR (Cursor already closed or not open yet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-dbsql-invalid-cursor-cursor-already-closed-or-not-open-yet/m-p/12474914#M2001348</link>
      <description>&lt;P&gt;Hello Friends,&lt;/P&gt;
  &lt;P&gt;I am receiving runtime error as " Cursor already closed or not open yet." for the below piece of code.&lt;/P&gt;
  &lt;P&gt;So, can anyone please help me how to solve it?&lt;/P&gt;
  &lt;P&gt;I have tried DB_COMMIT FM for commit work and also without it, still the same dump occurs.&lt;/P&gt;
  &lt;P&gt;data: gv_cursor TYPE cursor.&lt;/P&gt;
  &lt;P&gt; OPEN CURSOR WITH HOLD gv_cursor&lt;/P&gt;
  &lt;P&gt; FOR SELECT&lt;BR /&gt; erdk~opbel&lt;BR /&gt; fkkvkp~ktokl&lt;BR /&gt; FROM erdk AS erdk&lt;BR /&gt; INNER JOIN fkkvkp AS fkkvkp&lt;BR /&gt; ON fkkvkp~vkont = erdk~vkont&lt;BR /&gt; WHERE erdk~opbel IN s_prtdoc. &lt;/P&gt;
  &lt;P&gt;DO.&lt;/P&gt;
  &lt;P&gt; FETCH NEXT CURSOR gv_cursor&lt;BR /&gt; INTO TABLE gt_input&lt;BR /&gt; PACKAGE SIZE 1000.&lt;BR /&gt; IF sy-subrc IS INITIAL.&lt;BR /&gt; SORT gt_input BY opbel. &lt;BR /&gt; ELSE.&lt;BR /&gt; CLOSE CURSOR gv_cursor.&lt;BR /&gt; EXIT.&lt;BR /&gt; ENDIF. &lt;/P&gt;
  &lt;P&gt;****Some other logics is implemented below.&lt;/P&gt;
  &lt;P&gt;ENDDO.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 15:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-dbsql-invalid-cursor-cursor-already-closed-or-not-open-yet/m-p/12474914#M2001348</guid>
      <dc:creator>former_member651247</dc:creator>
      <dc:date>2022-02-05T15:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error DBSQL_INVALID_CURSOR (Cursor already closed or not open yet)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-dbsql-invalid-cursor-cursor-already-closed-or-not-open-yet/m-p/12474915#M2001349</link>
      <description>&lt;P&gt;Does it work without code from "other logics"?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 16:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-dbsql-invalid-cursor-cursor-already-closed-or-not-open-yet/m-p/12474915#M2001349</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-02-05T16:19:47Z</dc:date>
    </item>
  </channel>
</rss>

