<?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: Dequeue not working in one call in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500874#M1654006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The records are same in &lt;EM&gt;lit_tsw_subnode_asgns &amp;amp; lit_tsw_subnode_asgns_all&lt;/EM&gt; . I have double checked them. Only the name of the table have been changed.&lt;/P&gt;&lt;P&gt;Does it have anything to do with the &lt;STRONG&gt;Use Counter&lt;/STRONG&gt; of the lock entries? If you will see the sm12 entries, the ones with &lt;STRONG&gt;use counter = 1&lt;/STRONG&gt; are released in the DEQUEUE but those with &lt;STRONG&gt;use counter &amp;gt; 1&lt;/STRONG&gt; have their counter decremented on DEQUEUE and are released on another call to DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2012 06:42:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-03T06:42:42Z</dc:date>
    <item>
      <title>Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500865#M1653997</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;I am selecting some records based on some selection criteria and acquiring a lock on them by ENQUEUE. After processing the records, I call DEQUEUE. My problem is &lt;STRONG&gt;when I call DEQUEUE, some locks are being released and some are not. For those whose lock is not released, I have to call the DEQUEUE function again&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried debugging but am not able to figure out anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. I would be glad to furnish more information as and when required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500865#M1653997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-02T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500866#M1653998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try function module DEQUEUE_ALL and see if it releases those locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may not be an option if you can't release all locks of an LUW though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just curious: if you call DEQUEUE again for those keys that were not released, do they release with the second call?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 18:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500866#M1653998</guid>
      <dc:creator>Tamas_Hoznek</dc:creator>
      <dc:date>2012-02-02T18:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500867#M1653999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Varun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I would be glad to furnish more information as and when required.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could start with posting code snippet on how you are locking and unlocking the records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure the parameters passed to the ENQUEUE &amp;amp; DEQUEUE modules identify each record uniquely?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 04:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500867#M1653999</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-02-03T04:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500868#M1654000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The locking is being done by the following code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT lit_tsw_subnode_asgns  ASSIGNING &amp;lt;lwa_tsw_subnode_asgns&amp;gt;.
CALL FUNCTION 'ENQUEUE_/CASTP/EVALASGN'
                  EXPORTING
                    mode_/castp/t_valasgn = /castp/if_cas_constants=&amp;gt;gc_lock_exclusive
                    mandt                 = sy-mandt
                    tsw_guid              = &amp;lt;lwa_tsw_subnode_asgns&amp;gt;-tsw_guid
                    tsw_location          = &amp;lt;lwa_tsw_subnode_asgns&amp;gt;-tsw_location
                    transport_mode        = &amp;lt;lwa_tsw_subnode_asgns&amp;gt;-transport_mode
                    x_tsw_guid            = ' '
                    x_tsw_location        = ' '
                    x_transport_mode      = ' '
                    _scope                = '2'
                    _wait                 = ' '
                    _collect              = ' '
                  EXCEPTIONS
                    foreign_lock          = 1
                    system_failure        = 2
                    OTHERS                = 3.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each record is being identified uniquely by the parameters passed to ENQUEUE and DEQUEUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The unlocking is done as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 LOOP AT lit_tsw_subnode_asgns_all
          INTO lwa_tsw_subnode_asgns.

          CALL FUNCTION 'DEQUEUE_/CASTP/EVALASGN'
            EXPORTING
              mode_/castp/t_valasgn = /castp/if_cas_constants=&amp;gt;gc_lock_exclusive
              mandt                 = sy-mandt
              tsw_guid              = lwa_tsw_subnode_asgns-tsw_guid
              tsw_location          = lwa_tsw_subnode_asgns-tsw_location
              transport_mode        = lwa_tsw_subnode_asgns-transport_mode
              x_tsw_guid            = ' '
              x_tsw_location        = ' '
              x_transport_mode      = ' '
              _scope                = '2'
              _synchron             = ' '
              _collect              = ' '.

        ENDLOOP.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;The entries in the sm12 transaction:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After ENQUEUE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;03.02.2012                                             Dynamic List Display                                                    1


Client	User name	Time......	Lock mode	Table name	Lock Argument	Use Count.	Use Count.

300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	3006E09844C8ED8BD5AE10000000A4287F7CBOT      01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFA4999AB0209A8BECC RIVER RD01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFA4999AB020F98CD3CIN KELLOG01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAB84BC7575B9CF1FBL BURG   01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAB88D2EA0BC589CBBL BURG   05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAB88D2EA0C875581CIN KELLOG05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAB88D2EA0D648F45CBOT      05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFACFEF944EB8E15E8GR OHIO   01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAD81C846AA718D73GR OHIO   01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB020368259BL BURG   01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB02154C96BCIR VILLE 01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB021C04745LIMA      01	        0	        4
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFAB88D2EA0B2D0F03GR OHIO   05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFAB88D2EA0C298A4AC RIVER RD05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFAB88D2EA0D01C9AFCIR VILLE 05	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	300E8AF874CD31F4727E10000000A4287F7CBOT      01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	300################################LIMA      05	        0	        2

Selected Lock Entries:	       17&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Varun Saravagi on Feb 3, 2012 6:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 05:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500868#M1654000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T05:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500869#M1654001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In continuation of previous message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After DEQUEUE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;03.02.2012                                             Dynamic List Display                                                    1


Client	User name	Time......	Lock mode	Table name	Lock Argument	Use Count.	Use Count.

300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	3006E09844C8ED8BD5AE10000000A4287F7CBOT      01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFA4999AB0209A8BECC RIVER RD01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFA4999AB020F98CD3CIN KELLOG01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DDFAB84BC7575B9CF1FBL BURG   01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB020368259BL BURG   01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB02154C96BCIR VILLE 01	        0	        1
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	30080215ADEE5481DEFA4999AB021C04745LIMA      01	        0	        2
300	SARAVAGI	06:04:05	E	/CASTP/T_VALASGN	300E8AF874CD31F4727E10000000A4287F7CBOT      01	        0	        1

Selected Lock Entries:	       8&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameters passed to ENQUEUE and DEQUEUE identify each record uniquely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 05:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500869#M1654001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T05:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500870#M1654002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would not like to use DEQUEUE_ALL  because it will release even the locks I dont want to release.&lt;/P&gt;&lt;P&gt;and a second call to DEQUEUE for the keys that were not released, releases them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 05:25:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500870#M1654002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T05:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500871#M1654003</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;are you doing the commit work after ENQUEUE [loop and end loop], if so in order to avoid DEQUEUE [some locks are being released and some are not.]&lt;/P&gt;&lt;P&gt;use " commit work and wait " this statement i hope will solve your the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 06:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500871#M1654003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T06:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500872#M1654004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi $SAPGURU$&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using COMMIT WORK AND WAIT only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 06:20:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500872#M1654004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T06:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500873#M1654005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Varun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you're getting this mismatch because the records in &lt;EM&gt;lit_tsw_subnode_asgns&lt;/EM&gt; &amp;amp; &lt;EM&gt;lit_tsw_subnode_asgns_all&lt;/EM&gt; are different! Please check &amp;amp; confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that the lock will be released when the LUW ends!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 06:27:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500873#M1654005</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-02-03T06:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500874#M1654006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The records are same in &lt;EM&gt;lit_tsw_subnode_asgns &amp;amp; lit_tsw_subnode_asgns_all&lt;/EM&gt; . I have double checked them. Only the name of the table have been changed.&lt;/P&gt;&lt;P&gt;Does it have anything to do with the &lt;STRONG&gt;Use Counter&lt;/STRONG&gt; of the lock entries? If you will see the sm12 entries, the ones with &lt;STRONG&gt;use counter = 1&lt;/STRONG&gt; are released in the DEQUEUE but those with &lt;STRONG&gt;use counter &amp;gt; 1&lt;/STRONG&gt; have their counter decremented on DEQUEUE and are released on another call to DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 06:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500874#M1654006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-03T06:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dequeue not working in one call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500875#M1654007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have anything to do with the &lt;STRONG&gt;Use Counter&lt;/STRONG&gt; of the lock entries? If you will see the sm12 entries, the ones with &lt;STRONG&gt;use counter = 1&lt;/STRONG&gt; are released in the DEQUEUE but those with &lt;STRONG&gt;use counter &amp;gt; 1&lt;/STRONG&gt; have their counter decremented on DEQUEUE and are released on another call to DEQUEUE.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice observation Varun. F1 on this field tells us that counter &amp;gt; 1, means cumulation of lock entries &amp;amp; the lock on these entries will be released once the cumulation counter reaches 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see that you have use lock mode as E(xclusive), which allows records to be locked more than once in the same transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to avoid this scenario you can use the lock mode X (eXclusive non-cumulative).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the param &lt;EM&gt;_SCOPE&lt;/EM&gt;, imo this is a very important param which is often neglected!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Edited by: Suhas Saha on Feb 3, 2012 12:58 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Please note that the lock will be released when the LUW ends!&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Let me take this opportunity to correct myself &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Actually the locks are released when the transaction ends and not at the end of the LUW. So basically COMMIT WORK(AND WAIT) wont release the locks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: You can refer to the SAP online documentation on [Cumulation of Locks|http://help.sap.com/saphelp_nw04/helpdata/en/37/a2e3a8344411d3acb00000e83539c3/content.htm] for further details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 07:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dequeue-not-working-in-one-call/m-p/8500875#M1654007</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-02-03T07:25:04Z</dc:date>
    </item>
  </channel>
</rss>

