<?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 parallel cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057862#M1175533</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;can i use more than one parallel cursor , when i looping thru different internal tables,&lt;/P&gt;&lt;P&gt;i used once it in my current prog as i need multiple Grn no(ekbe-belnr) , with respect to single po(ekpo-ebeln).&lt;/P&gt;&lt;P&gt;but in my current prog. i also need multiple (konv-kposn) vaue with respect to sigle po no,&lt;/P&gt;&lt;P&gt;to display multiple tax calculation!&lt;/P&gt;&lt;P&gt;plz help , i badly needed this answer in no time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2009 13:28:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-09T13:28:43Z</dc:date>
    <item>
      <title>parallel cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057862#M1175533</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;can i use more than one parallel cursor , when i looping thru different internal tables,&lt;/P&gt;&lt;P&gt;i used once it in my current prog as i need multiple Grn no(ekbe-belnr) , with respect to single po(ekpo-ebeln).&lt;/P&gt;&lt;P&gt;but in my current prog. i also need multiple (konv-kposn) vaue with respect to sigle po no,&lt;/P&gt;&lt;P&gt;to display multiple tax calculation!&lt;/P&gt;&lt;P&gt;plz help , i badly needed this answer in no time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 13:28:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057862#M1175533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T13:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: parallel cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057863#M1175534</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;You can also open more than one cursor in parallel for a single database table. If a cursor is already open, you cannot reopen it. To close a cursor explicitly, use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE CURSOR &amp;lt;c&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aakash Banga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 13:38:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057863#M1175534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T13:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: parallel cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057864#M1175535</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;You can use this..Parallel cursor concept...But make sure you read the internal tables using the index and these tables should be Sorted...Else this will be a performance issues...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you have the key fields in the read as many as possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you need to have an exit condition at the end or else it will loop the entire tables(itab2 and itab3)....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 ito watab2 with key....&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at itab2 from sy-tabix.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;read table itab3 into watab3 with key....&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab 3 from sy-tabix..&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;at end of...&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;---&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;at end of...&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 13:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057864#M1175535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T13:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: parallel cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057865#M1175536</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;Have a look at the code below. The select the entries from KONV based on the requirement. Better not to use the select *, instead select the required fields from the tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : ekko, ekpo, ekbe, konv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      it_ekbe TYPE TABLE OF ekbe WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      it_konv TYPE TABLE OF konv WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_index1 TYPE sytabix,&lt;/P&gt;&lt;P&gt;      l_index2 TYPE sytabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS s_ebeln FOR ekko-ebeln.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS s_knumv FOR konv-knumv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM ekpo INTO TABLE it_ekpo WHERE ebeln IN s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT it_ekpo[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM ekbe INTO TABLE it_ekbe&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN it_ekpo&lt;/P&gt;&lt;P&gt;    WHERE ebeln = it_ekpo-ebeln&lt;/P&gt;&lt;P&gt;      AND ebelp = it_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM konv INTO TABLE it_konv&lt;/P&gt;&lt;P&gt;              WHERE knumv = s_knumv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT it_ekpo BY ebeln ebelp.&lt;/P&gt;&lt;P&gt;SORT it_ekbe BY ebeln ebelp.&lt;/P&gt;&lt;P&gt;SORT it_konv BY knumv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_ekpo.&lt;/P&gt;&lt;P&gt;  LOOP AT it_ekbe FROM l_index1.&lt;/P&gt;&lt;P&gt;    if ( it_ekbe-ebeln ne it_ekpo-ebeln ) &lt;/P&gt;&lt;P&gt;          and ( it_ekbe-ebelp ne it_ekpo-ebelp ).&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    else.  &lt;/P&gt;&lt;P&gt;    l_index1 = sy-tabix.&lt;/P&gt;&lt;P&gt;*do the necessary calculations&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    LOOP AT it_konv FROM l_index2.&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write the necessary if condition so that it would exit from the loop&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if (.......)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill the required fields and do the necessary calculations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      l_index2 = sy-tabix.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&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;The loop of the konv table has to be placed as required based on whether it has to be in the loop of EKBE or out of EKBE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 15:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor/m-p/5057865#M1175536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T15:24:29Z</dc:date>
    </item>
  </channel>
</rss>

