<?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: Programaticaly Unlocking the locked material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987816#M1341909</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 may be misunderstanding your requirement, but I don't think you can go removing locks just because you want to update a material. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a material is locked it means another process is changing it, if you remove that lock to make your update then there will be two (potentially conflicting) updates.  When these are both applied what will be the end result for the data?  What if your BDC has the lock first then some other process comes along and removes it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before your BDC runs check the lock, if it is set then wait and retry, or issue an error and reprocess the material later. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2009 13:35:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-21T13:35:16Z</dc:date>
    <item>
      <title>Programaticaly Unlocking the locked material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987814#M1341907</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;I have a requirement to Unlock the material before executing BDC as i get error that the material is locked when BDC is executed.can anybody guide me how to unlock material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sanjivrd on Aug 21, 2009 3:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 13:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987814#M1341907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T13:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Programaticaly Unlocking the locked material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987815#M1341908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try using FM DEQUEUE_EMMARAS and DEQUEUE_EMMARAE passing material number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR Jaideep,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 13:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987815#M1341908</guid>
      <dc:creator>jaideepsharma</dc:creator>
      <dc:date>2009-08-21T13:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programaticaly Unlocking the locked material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987816#M1341909</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 may be misunderstanding your requirement, but I don't think you can go removing locks just because you want to update a material. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a material is locked it means another process is changing it, if you remove that lock to make your update then there will be two (potentially conflicting) updates.  When these are both applied what will be the end result for the data?  What if your BDC has the lock first then some other process comes along and removes it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before your BDC runs check the lock, if it is set then wait and retry, or issue an error and reprocess the material later. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 13:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987816#M1341909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Programaticaly Unlocking the locked material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987817#M1341910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which transaction is calling the BDC, call SM12 and look at the lock entries, double-click on entries to find the enqueue object and keys, then in you report use the DEQUEUE_&amp;lt;object&amp;gt; FM to release the lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some lock objects with MATNR&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; EMMARAE	Lock MARA and MARM/MAKT exclusively&lt;/P&gt;&lt;P&gt;EMMARAS	Lock MARA and MARM/MAKT: shared&lt;/P&gt;&lt;P&gt;EMMARCE	Lock plant data (incl. stocks, consumption, forecast data)&lt;/P&gt;&lt;P&gt;EMMARCS	Locking of Plant Data (Incl. Stocks, Consumption) Shared&lt;/P&gt;&lt;P&gt;EMMARME	Lock Base Unit of Measure (Exclusive)&lt;/P&gt;&lt;P&gt;EMMARMS	Lock Base Unit of Measure (Shared)&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it is not ever advisable to release locks in the middle of a transaction, try some other solution like submit the execution of the batch input via a CALL FUNCTION IN BACKGROUND TASK which will execute after the COMMIT WORK submitted update tasks are ended and locks released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 13:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/programaticaly-unlocking-the-locked-material/m-p/5987817#M1341910</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-08-21T13:36:35Z</dc:date>
    </item>
  </channel>
</rss>

