<?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: duplicates when using fetch cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345528#M1398086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it is MBEW and not MVEW? Sorry, hard to tell from the distance without looking at your data.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2009 17:00:40 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2009-10-27T17:00:40Z</dc:date>
    <item>
      <title>duplicates when using fetch cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345525#M1398083</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;We have a custom program that is selecting data from a custom view.  This custom database view is a join of tables MVEW and MEAN.  Join condition is Matnr.  Here is a portion of the custom code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN CURSOR g_cursor FOR SELECT matnr bwkey verpr ean11&lt;/P&gt;&lt;P&gt;                           FROM zv_sku_inv&lt;/P&gt;&lt;P&gt;                           WHERE bwkey in s_bwkey&lt;/P&gt;&lt;P&gt;                           ORDER BY ean11 bwkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    FETCH NEXT CURSOR g_cursor INTO TABLE t_mbew&lt;/P&gt;&lt;P&gt;      PACKAGE SIZE p_pkgsiz.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      LOOP AT t_mbew ASSIGNING &amp;lt;fs_mbew&amp;gt;.&lt;/P&gt;&lt;P&gt;        WRITE &amp;lt;fs_mbew&amp;gt;-verpr TO wa_verpr CURRENCY 'USD' LEFT-JUSTIFIED.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write current dataset to the output file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        CONCATENATE &amp;lt;fs_mbew&amp;gt;-bwkey&lt;/P&gt;&lt;P&gt;                    &amp;lt;fs_mbew&amp;gt;-ean11&lt;/P&gt;&lt;P&gt;                    wa_verpr&lt;/P&gt;&lt;P&gt;                   INTO outputdata&lt;/P&gt;&lt;P&gt;                   SEPARATED BY p_delim.&lt;/P&gt;&lt;P&gt;        TRANSFER outputdata TO fname.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it turns out that the fetch is retrieving duplicates some times, and we know the view does not have duplicates in it.  What could be causing this behaviour?  Would the addtion "on hold" help to avoid duplicates?  Unfortunately, we are unable to reproduce this production problem in our testing environment.   Thanks in advance for any feedback you might have that would resolve this issue.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Leticia Chee-Chung&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 15:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345525#M1398083</guid>
      <dc:creator>leticia_chee</dc:creator>
      <dc:date>2009-10-27T15:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: duplicates when using fetch cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345526#M1398084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both tables have more fields than MATNR in their primary indexes, so it is well possible that your view produces duplicates when only a subset of the fields is being selected. How did you make sure that the view does not contain duplicates. Are you using any select options in the view? Which ones?&lt;/P&gt;&lt;P&gt;"package size" works reliably, as far as I know. "with hold" is only relevant when database commits occur.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345526#M1398084</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-10-27T16:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: duplicates when using fetch cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345527#M1398085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The selection condition makes them unique.  It is MBEW-BWTAR EQ " " and MEAN-HPEAN = "X".   Also, I did an se16 on the duplciates I am getting in the ouptut file, and in the view they only appear once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345527#M1398085</guid>
      <dc:creator>leticia_chee</dc:creator>
      <dc:date>2009-10-27T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: duplicates when using fetch cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345528#M1398086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it is MBEW and not MVEW? Sorry, hard to tell from the distance without looking at your data.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 17:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345528#M1398086</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-10-27T17:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: duplicates when using fetch cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345529#M1398087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Thomas, it is MBEW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 17:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicates-when-using-fetch-cursor/m-p/6345529#M1398087</guid>
      <dc:creator>leticia_chee</dc:creator>
      <dc:date>2009-10-27T17:35:42Z</dc:date>
    </item>
  </channel>
</rss>

