<?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: Datebase Cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649578#M2014939</link>
    <description>&lt;P&gt;It's explained in the documentation. Why not pressing F1?&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 13:10:54 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-04-19T13:10:54Z</dc:date>
    <item>
      <title>Datebase Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649576#M2014937</link>
      <description>&lt;P&gt;what is the purpose of this variable -&amp;gt; dbcursor ? because sometimes it becomes 1 or 2 &lt;BR /&gt;&lt;BR /&gt;open cursor with hold @data(&lt;STRONG&gt;dbcursor&lt;/STRONG&gt;) for&lt;/P&gt;
  &lt;P&gt; select * from scarr.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 09:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649576#M2014937</guid>
      <dc:creator>AJeB</dc:creator>
      <dc:date>2023-04-19T09:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Datebase Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649577#M2014938</link>
      <description>&lt;P&gt;You can have more than one cursor at a time - up to 17. You have a different dbcursor for each cursor open, allowing you to specify which cursor you're fetching from or closing.&lt;/P&gt;&lt;P&gt;The help for the FETCH statement has a nice example &lt;A href="https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/abapfetch.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/abapfetch.htm&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN CURSOR @DATA(dbcur1) FOR
  SELECT carrid, COUNT(*) AS count
         FROM spfli
         GROUP BY carrid
         ORDER BY carrid.

OPEN CURSOR @DATA(dbcur2) FOR
  SELECT *
         FROM spfli
         ORDER BY carrid.

DATA: BEGIN OF counter,
        carrid TYPE spfli-carrid,
        count  TYPE i,
      END OF counter,
      spfli_tab TYPE TABLE OF spfli.
DO.
  FETCH NEXT CURSOR @dbcur1 INTO @counter.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    EXIT.
  ENDIF.
  cl_demo_output=&amp;gt;next_section( |{ counter-carrid
                              }, { counter-count }| ).
  FETCH NEXT CURSOR @dbcur2
    INTO TABLE @spfli_tab PACKAGE SIZE @counter-count.
  cl_demo_output=&amp;gt;write( spfli_tab ).
ENDDO.

CLOSE CURSOR: @dbcur1,
              @dbcur2.

cl_demo_output=&amp;gt;display( ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 11:18:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649577#M2014938</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2023-04-19T11:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Datebase Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649578#M2014939</link>
      <description>&lt;P&gt;It's explained in the documentation. Why not pressing F1?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 13:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/datebase-cursor/m-p/12649578#M2014939</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-04-19T13:10:54Z</dc:date>
    </item>
  </channel>
</rss>

