<?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 Object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571706#M258087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Senthil,&lt;/P&gt;&lt;P&gt; Check out this thread ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2015283"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Sep 2006 08:58:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-21T08:58:12Z</dc:date>
    <item>
      <title>LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571703#M258084</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 created a lock object(EZ_lock) in SE11 using table MARA.&lt;/P&gt;&lt;P&gt;in user 1 i coded &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables Mara.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EZ_LOCK'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   MODE_MARA            = 'E'&lt;/P&gt;&lt;P&gt;   MANDT                = SY-MANDT&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MATNR                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_MATNR              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _SCOPE               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _WAIT                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _COLLECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FOREIGN_LOCK         = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SYSTEM_FAILURE       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'table locked'.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;and executed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In User 2.&lt;/P&gt;&lt;P&gt;i coded like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mara-matnr = '000000000000000025'.&lt;/P&gt;&lt;P&gt;modify mara.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'updated'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'table locked'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;and executed it.&lt;/P&gt;&lt;P&gt;As per the concept it should not update the mara table. However im getting the record in the mara table and the program output as updated.&lt;/P&gt;&lt;P&gt;Kindly clarify this.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 08:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571703#M258084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T08:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571704#M258085</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;In func module, in import parameters u have to pass '000000000000000025'. to MATNR field.. u have to pass all the key values in MARA table to this func module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz mark if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Divakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 08:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571704#M258085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T08:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571705#M258086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Divakar,&lt;/P&gt;&lt;P&gt;Have tried that also, it has not worked. Any other solution. For both Entire table lock and record level locking??&lt;/P&gt;&lt;P&gt;Moreover how do i know the user2 is entering this record '000000000000000025'.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 08:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571705#M258086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571706#M258087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Senthil,&lt;/P&gt;&lt;P&gt; Check out this thread ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2015283"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 08:58:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571706#M258087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T08:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571707#M258088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Senthil,&lt;/P&gt;&lt;P&gt;According to my observation, u r not releasing the lock manually. There is one more way to release the lock,in user1 u could have executed the program and u might have come back(F3), this will also release(Dequeue) the lock, so the user2 is able to update the lock, one thing u can try is execute the program in user1 and in user2 goto tcode SM12, check whether the Lock is there on Mara, if it is there, try to execute ur program, it will surely give Table locked by user user1.&lt;/P&gt;&lt;P&gt;Hope this will solve ur issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards:-&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Santosh.D&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571707#M258088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571708#M258089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u created lock object. very good. u tried to update MARA in program fine. it will be done successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but where is the problem. if the intention is to see how locking works, u should keep the material open in change mode MM02 and then u should try updating it. then system will say, the material is currently being edited by user XXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correct if i am not right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:20:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571708#M258089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571709#M258090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program for user 1 is in output mode only. In sm12 of user 1, it displays table MARA with lock argument, so table locked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However in SM12 of user 2 , iam not able to the lock for mara. What is the reason behind this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:21:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571709#M258090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571710#M258091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Senthil,&lt;/P&gt;&lt;P&gt;Already there are some standard lock objects for MARA table. Use the same.&lt;/P&gt;&lt;P&gt;&lt;/P&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571710#M258091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571711#M258092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pawan,&lt;/P&gt;&lt;P&gt;Good, it works as per u said. Im getting 'locked by user1' when i try to change any material in MM02 in user 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the concept exactly????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i can able to modify or add a row to the mara table the programming (code) in user 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the concept exactly????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody clear this, so that i can contribute points and close the thread.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571711#M258092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571712#M258093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Senthil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well the concept is that, the someone is in change mode, that means he is editing that particular material number. So the lock would be set. Now if some other user tries to access the same material, he will get table lock error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user is in display mode, then the table lock is not set and hence another user can access it without getting any table lock error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 09:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571712#M258093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-21T09:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: LocK Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571713#M258094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Senthil!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One remark might be missing in the discussion: SAP's lock concept is NOT implicit. If there is an existing lock for a table, this does not prevent updates (as in your example). Only if (every!) DB access checks first for existing locks (and stops execution), locks make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you should rather use standard lock objects in case you plan to change standard tables - if you have independent lock objects, standard might still change the table, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 10:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-object/m-p/1571713#M258094</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-09-21T10:13:02Z</dc:date>
    </item>
  </channel>
</rss>

