<?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 cursor concept in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024854#M1348276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when do we use cursor while coding .. in which situation it must be used and why ?&lt;/P&gt;&lt;P&gt;I have heard that its used as a optimization technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searhced for this query in SCN but didnt get a satisfactory answer ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2009 04:33:59 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2009-08-13T04:33:59Z</dc:date>
    <item>
      <title>cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024854#M1348276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when do we use cursor while coding .. in which situation it must be used and why ?&lt;/P&gt;&lt;P&gt;I have heard that its used as a optimization technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searhced for this query in SCN but didnt get a satisfactory answer ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 04:33:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024854#M1348276</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-08-13T04:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024855#M1348277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;please refer the below links..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b23358411d1829f0000e829fbfe/content.htm#http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b23358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b23358411d1829f0000e829fbfe/content.htm#http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b23358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/select" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/select&lt;/A&gt;&lt;EM&gt;Statements&lt;/EM&gt;and&lt;EM&gt;CURSOR&lt;/EM&gt;statement&lt;EM&gt;-&lt;/EM&gt;Performance+Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;amudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 05:11:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024855#M1348277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T05:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024856#M1348278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean, OPEN CURSOR / FETCH statements for DB access or parallel cursor technique for internal table handling, or yet another cursor?&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 12:24:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024856#M1348278</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-08-13T12:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024857#M1348279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thomas i meant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN CURSOR / FETCH statements for DB access ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and what is this parallel cursor technique  ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 04:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024857#M1348279</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-08-14T04:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024858#M1348280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Personally I am using OPEN CURSOR very occasionally with the WITH HOLD addition to perform package processing of huge update tasks that require periodic database commits. A normal SELECT loop without cursor hold would be interrupted by a commit and lead to a short dump.&lt;/P&gt;&lt;P&gt;Other than that I see no reason to prefer OPEN CURSOR / FETCH over a normal SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better don't even learn about the quite old parallel cursor technique for nested internal table access, as SORTED tables provide the same performance with much less complicated code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 07:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024858#M1348280</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-08-14T07:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: cursor concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024859#M1348281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Parallel Cursor method is used when we need to process data across two internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Consider the following exapmple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Loop at table1 into wa_Table1.&lt;/P&gt;&lt;P&gt;          loop at table2 into wa_table2.&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                  process the data.&lt;/P&gt;&lt;P&gt;             }&lt;/P&gt;&lt;P&gt;           endloop.  "for table2.&lt;/P&gt;&lt;P&gt;         Endloop.  "for table 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    In the above example the values of table 2 are processed from the first record every time and ther would be considerable amount of time taken to process the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   To counter this we use parallel cursor method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     loop at it_table1 into wa_table1.&lt;/P&gt;&lt;P&gt;    read table it_table2 with key XXXX= wa_table1-XXXX binary search&lt;/P&gt;&lt;P&gt;                                                 transporting no fields.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      v_variable = sy-tabix.    "Table indes is made a note of in the variable v_variable&lt;/P&gt;&lt;P&gt;      loop at it_mseg into x_mseg from v_indms.   "The table is read from the index read above.&lt;/P&gt;&lt;P&gt;        if wa_table2-XXXX &amp;lt;&amp;gt; wa_table1-XXXX.&lt;/P&gt;&lt;P&gt;          exit.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;     { &lt;/P&gt;&lt;P&gt;           Required processing of the two internal tables&lt;/P&gt;&lt;P&gt;     }&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;      endloop.&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;&lt;/P&gt;&lt;P&gt;In the above case the second loop only starts at the record for the corresponding value of field in the first table and not from the first record each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This brings about a lot of time saving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shree Tejus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 09:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor-concept/m-p/6024859#M1348281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T09:30:37Z</dc:date>
    </item>
  </channel>
</rss>

