<?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 Error with BAPI call in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605765#M1277477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your BAPI sets a lock using ENQUEUE. Using debug or just looking at the code, (or I think there is a trace somewhere), you can find the FM used to do the ENQUEUE. What you need to do, is in a loop, try to get the same lock, using the same ENQUEUE function module. If you can't get a lock, then it means that BAPI processing hasn't quite finished. So use FM Enque_Sleep to sleep for a number of seconds. Then try and get a lock again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you get a lock, immediately release it (Using a DEQUEUE FM with exactly the same params, and do your next task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't use DEQUEUE_ALL. You don't want to inadvertantly remove a lock that you actually need. That way lies db corrupution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2009 12:06:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-20T12:06:47Z</dc:date>
    <item>
      <title>Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605761#M1277473</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;We are using the BAPI call to the FM BAPI_GOODSMVT_CREATE for goods recipt posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we have multiple PO's the first PO is posted succesfully and the next PO gives a locking error as   &lt;STRONG&gt;"The plant data of the material &amp;lt;material number&amp;gt;  is locked by the user &amp;lt;usedrid&amp;gt; "&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to dequeue the plant data for the material? Is there any specific function module ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;stk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 11:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605761#M1277473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T11:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605762#M1277474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use fm 'DEQUEUE_ALL' after bapi call&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 11:28:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605762#M1277474</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2009-05-20T11:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605763#M1277475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi stock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEQUEUE_E_MATNR_LOCK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if does not work serch in SE37 &lt;STRONG&gt;DE&lt;/STRONG&gt;MATNR*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U will get so many function modules.May be some thisng will help u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 11:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605763#M1277475</guid>
      <dc:creator>tarangini_katta</dc:creator>
      <dc:date>2009-05-20T11:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605764#M1277476</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;Both DEQUEUE_E_MATNR_LOCK and DEQUEUE_ALL doesnt remove the lock...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i check the program in debug mode the lock is removed and the posting is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still problem persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 12:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605764#M1277476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T12:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605765#M1277477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your BAPI sets a lock using ENQUEUE. Using debug or just looking at the code, (or I think there is a trace somewhere), you can find the FM used to do the ENQUEUE. What you need to do, is in a loop, try to get the same lock, using the same ENQUEUE function module. If you can't get a lock, then it means that BAPI processing hasn't quite finished. So use FM Enque_Sleep to sleep for a number of seconds. Then try and get a lock again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you get a lock, immediately release it (Using a DEQUEUE FM with exactly the same params, and do your next task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't use DEQUEUE_ALL. You don't want to inadvertantly remove a lock that you actually need. That way lies db corrupution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 12:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605765#M1277477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T12:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605766#M1277478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Called  BAPI_TRANSACTION_COMMIT after the posting BAPI call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 07:03:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605766#M1277478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T07:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Error with BAPI call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605767#M1277479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, can you give me code example of it....??&lt;/P&gt;&lt;P&gt;table S021 no update after bapi commit..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2010 21:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-error-with-bapi-call/m-p/5605767#M1277479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-05T21:42:54Z</dc:date>
    </item>
  </channel>
</rss>

