<?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 ENQUEUE and DEQUEUE in a loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306144#M1636121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program where I am doing locking and unlocking at the record level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This ENQUEUE and DEQUEUE is being &lt;STRONG&gt;&lt;U&gt;done in a loop&lt;/U&gt;&lt;/STRONG&gt;. So, the flow of the code in a single loop pass is as follows:&lt;/P&gt;&lt;P&gt;ENQUEUE-&amp;gt; Update-&amp;gt; DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I am trying to update close to 100000-150000 records, the lock table gets overflowed and program is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MY question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If i am doing a DEQUEUE in the loop pass itself, ideally the lock entry should be deleted from the lock table. Why does the entries dont get deleted and the lock table overflow appears?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;/P&gt;&lt;P&gt;1. I am correctly doing a locking and unlocking at the record level.&lt;/P&gt;&lt;P&gt;2. I am aware that we should do mass updation by using table level lock rather than record level lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Swati Dogra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2011 05:48:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-30T05:48:31Z</dc:date>
    <item>
      <title>ENQUEUE and DEQUEUE in a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306144#M1636121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program where I am doing locking and unlocking at the record level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This ENQUEUE and DEQUEUE is being &lt;STRONG&gt;&lt;U&gt;done in a loop&lt;/U&gt;&lt;/STRONG&gt;. So, the flow of the code in a single loop pass is as follows:&lt;/P&gt;&lt;P&gt;ENQUEUE-&amp;gt; Update-&amp;gt; DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I am trying to update close to 100000-150000 records, the lock table gets overflowed and program is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MY question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If i am doing a DEQUEUE in the loop pass itself, ideally the lock entry should be deleted from the lock table. Why does the entries dont get deleted and the lock table overflow appears?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;/P&gt;&lt;P&gt;1. I am correctly doing a locking and unlocking at the record level.&lt;/P&gt;&lt;P&gt;2. I am aware that we should do mass updation by using table level lock rather than record level lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Swati Dogra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 05:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306144#M1636121</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-30T05:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE and DEQUEUE in a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306145#M1636122</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;Try using 'COMMIT WORK' after your update and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'WAIT' after your 'DEQUEUE' to avoid lock overflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this may be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sharin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 05:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306145#M1636122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-30T05:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE and DEQUEUE in a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306146#M1636123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DEQUEUE function works asynchronously (delegated to system) unless specified using _SYNCHRON parameter. That is, the locks are not guaranteed to be removed after the DEQUEUE function returns to the calling program, if _SYNCHRON parameter is not set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to call DEQUEUE function with parameter _SYNCHRON = 'X', so that it waits till the lock is removed from the lock table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, as you realize, locking and unlocking tables at record level for so many records will hit performance very badly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 06:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-dequeue-in-a-loop/m-p/8306146#M1636123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-30T06:01:03Z</dc:date>
    </item>
  </channel>
</rss>

