<?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: Lock specific number of records using ENQUEUE &amp; DEQUEUE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379904#M1403164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also make sure it is not used in any secondary index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2009 16:27:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-30T16:27:35Z</dc:date>
    <item>
      <title>Lock specific number of records using ENQUEUE &amp; DEQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379900#M1403160</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;Is it possible to lock a group of records in R/3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to update a set of records in VBAP table. I'm not using a BAPI here. Instead, I use a direct UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, i know i can lock individual records by passing VBELN and POSNR. But what if i have to lock 10 records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible in any way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current solution is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) LOOP at ITAB&lt;/P&gt;&lt;P&gt;2) LOCK each entry&lt;/P&gt;&lt;P&gt;3) UPDATE VBAP for that entry&lt;/P&gt;&lt;P&gt;4) UNLOCK the entry&lt;/P&gt;&lt;P&gt;5) Endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought this solution might work: (Assume 10 records are present in ITAB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) LOOP at ITAB (Lock all 10 entries)&lt;/P&gt;&lt;P&gt;2) LOCK that entry&lt;/P&gt;&lt;P&gt;3) ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) UPDATE VBAP from ITAB (Updates all 10 entries in one databae access)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) LOOP at ITAB(Unlock all 10 entries)&lt;/P&gt;&lt;P&gt;6) UNLOCK that entry&lt;/P&gt;&lt;P&gt;7) ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tabraiz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 15:33:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379900#M1403160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lock specific number of records using ENQUEUE &amp; DEQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379901#M1403161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What field are you changing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 15:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379901#M1403161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T15:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lock specific number of records using ENQUEUE &amp; DEQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379902#M1403162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Field ARKTX. Not a key field. It is a description field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 16:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379902#M1403162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T16:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lock specific number of records using ENQUEUE &amp; DEQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379903#M1403163</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;Both of your solutions will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With solution 1 there will always be only 1 enqueue object created, because you always enqueue, perform the update and dequeue.&lt;/P&gt;&lt;P&gt;This means that in SM12 you will only see 1 enqueue entry on your user ID at the same time when your program runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution 2 is also possible but there you will have different enqueue objects that will be created, because you enqueue everything, then perform the updates and then dequeue everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SM12 (lock entries) this will result in more enqueue records on your user ID the time your program runs.&lt;/P&gt;&lt;P&gt;You have to pay attention that lock entries (SM12) are stored in a queue that is limited, so make sure with solution 2 that you don't overflow the enqueue queue ! ! !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Via tcode RZ11 you can check parameter &lt;STRONG&gt;enque/table_size&lt;/STRONG&gt; (Size of lock table).&lt;/P&gt;&lt;P&gt;Check the parameter value but also its documentation and you will understand why you should limit the number of open lock records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wim Van den Wyngaert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 16:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379903#M1403163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T16:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lock specific number of records using ENQUEUE &amp; DEQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379904#M1403164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also make sure it is not used in any secondary index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 16:27:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-specific-number-of-records-using-enqueue-dequeue/m-p/6379904#M1403164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T16:27:35Z</dc:date>
    </item>
  </channel>
</rss>

