<?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: How to create a lock object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209354#M765108</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;You open SE11 tcode and choose Lock Object Radio button and enter lockobject name but first 2 chars should be "EZ" ( suppose if you are creating lock object for ZMAIN table for field1 means name can be EZ_MAIN_FIELD1 ) press create button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter text for lock object.Like Lock object for MAIN_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Goto tables option and provide your table name means to which table you are locking.&lt;/P&gt;&lt;P&gt;Like we give ZMAIN  and press enter.&lt;/P&gt;&lt;P&gt;you give type of locklock mode whether it can be shared /Exclusive lock (cant be shared)..etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Lock Parameter option you choose field1 if it is available ( It will be available if it primary key in database table ) and then save &amp;amp; activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for you 2 fms are created by system automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;names started with ENQUEUE_EZ_MAIN_FIELD1&lt;/P&gt;&lt;P&gt; &amp;amp; DEQUEUE EZ_MAIN_FIELD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So ENQUEUE_EZ_MAIN_FIELD1 ,you can use for locking the table from updation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEQUEUE_EZ_MAIN_FIELD1 is used to release the lock .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so any one can do updation when the lock is released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you call these fms in your program and pass parameter to this fm in place of field1 = itab-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here iam giving sample code.Please look into one once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'ENQUEUE_EZMDEMAIN'       &lt;/P&gt;&lt;P&gt;      EXPORTING                          &lt;/P&gt;&lt;P&gt;           mode_zmdemain  = 'E'          &lt;/P&gt;&lt;P&gt;           mandt          = sy-mandt     &lt;/P&gt;&lt;P&gt;           serial_no      = p_value      &lt;/P&gt;&lt;P&gt;           x_serial_no    = ' '          &lt;/P&gt;&lt;P&gt;           _scope         = '2'          &lt;/P&gt;&lt;P&gt;           _wait          = ' '          &lt;/P&gt;&lt;P&gt;           _collect       = ' '          &lt;/P&gt;&lt;P&gt;      EXCEPTIONS                         &lt;/P&gt;&lt;P&gt;           foreign_lock   = 1            &lt;/P&gt;&lt;P&gt;           system_failure = 2            &lt;/P&gt;&lt;P&gt;           OTHERS         = 3.           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For releasing lock ::::::::::::::::::::::::::::::::::::::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call function 'DEQUEUE_EZMDEMAIN'              &lt;/P&gt;&lt;P&gt;        exporting                                 &lt;/P&gt;&lt;P&gt;             mode_zmdemain = 'E'                  &lt;/P&gt;&lt;P&gt;             mandt         = sy-mandt             &lt;/P&gt;&lt;P&gt;             serial_no     = zmdemain-serial_no   &lt;/P&gt;&lt;P&gt;             x_serial_no   = ' '                  &lt;/P&gt;&lt;P&gt;             _scope        = _dscope              &lt;/P&gt;&lt;P&gt;             _synchron     = ' '                  &lt;/P&gt;&lt;P&gt;             _collect      = ' '.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward with points if helpful........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Dec 2007 08:14:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-17T08:14:15Z</dc:date>
    <item>
      <title>How to create a lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209350#M765104</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;I want to create a lock object but how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 07:48:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209350#M765104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T07:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209351#M765105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deniz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SE11, enter name for lock object like EZ.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 07:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209351#M765105</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-12-17T07:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209352#M765106</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;Check the below link .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 07:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209352#M765106</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-12-17T07:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209353#M765107</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;Goto SE11&lt;/P&gt;&lt;P&gt;Entern Lock Object Name : EZTAB1. (Should start with EZ or EY).&lt;/P&gt;&lt;P&gt;Select Create Button..&lt;/P&gt;&lt;P&gt;Enter the Primary Table (your ztable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and Activate .&lt;/P&gt;&lt;P&gt;It will generate two FMs &lt;/P&gt;&lt;P&gt;1. ENQUEUE_EZTAB1 (To lock the record)&lt;/P&gt;&lt;P&gt;2. DEQUEUE_EZTAB1. (To release the Lock)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Pattern call these FMs in your program&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;omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 07:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209353#M765107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T07:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lock object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209354#M765108</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;You open SE11 tcode and choose Lock Object Radio button and enter lockobject name but first 2 chars should be "EZ" ( suppose if you are creating lock object for ZMAIN table for field1 means name can be EZ_MAIN_FIELD1 ) press create button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter text for lock object.Like Lock object for MAIN_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Goto tables option and provide your table name means to which table you are locking.&lt;/P&gt;&lt;P&gt;Like we give ZMAIN  and press enter.&lt;/P&gt;&lt;P&gt;you give type of locklock mode whether it can be shared /Exclusive lock (cant be shared)..etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Lock Parameter option you choose field1 if it is available ( It will be available if it primary key in database table ) and then save &amp;amp; activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for you 2 fms are created by system automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;names started with ENQUEUE_EZ_MAIN_FIELD1&lt;/P&gt;&lt;P&gt; &amp;amp; DEQUEUE EZ_MAIN_FIELD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So ENQUEUE_EZ_MAIN_FIELD1 ,you can use for locking the table from updation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEQUEUE_EZ_MAIN_FIELD1 is used to release the lock .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so any one can do updation when the lock is released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you call these fms in your program and pass parameter to this fm in place of field1 = itab-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here iam giving sample code.Please look into one once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'ENQUEUE_EZMDEMAIN'       &lt;/P&gt;&lt;P&gt;      EXPORTING                          &lt;/P&gt;&lt;P&gt;           mode_zmdemain  = 'E'          &lt;/P&gt;&lt;P&gt;           mandt          = sy-mandt     &lt;/P&gt;&lt;P&gt;           serial_no      = p_value      &lt;/P&gt;&lt;P&gt;           x_serial_no    = ' '          &lt;/P&gt;&lt;P&gt;           _scope         = '2'          &lt;/P&gt;&lt;P&gt;           _wait          = ' '          &lt;/P&gt;&lt;P&gt;           _collect       = ' '          &lt;/P&gt;&lt;P&gt;      EXCEPTIONS                         &lt;/P&gt;&lt;P&gt;           foreign_lock   = 1            &lt;/P&gt;&lt;P&gt;           system_failure = 2            &lt;/P&gt;&lt;P&gt;           OTHERS         = 3.           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For releasing lock ::::::::::::::::::::::::::::::::::::::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call function 'DEQUEUE_EZMDEMAIN'              &lt;/P&gt;&lt;P&gt;        exporting                                 &lt;/P&gt;&lt;P&gt;             mode_zmdemain = 'E'                  &lt;/P&gt;&lt;P&gt;             mandt         = sy-mandt             &lt;/P&gt;&lt;P&gt;             serial_no     = zmdemain-serial_no   &lt;/P&gt;&lt;P&gt;             x_serial_no   = ' '                  &lt;/P&gt;&lt;P&gt;             _scope        = _dscope              &lt;/P&gt;&lt;P&gt;             _synchron     = ' '                  &lt;/P&gt;&lt;P&gt;             _collect      = ' '.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward with points if helpful........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 08:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-lock-object/m-p/3209354#M765108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T08:14:15Z</dc:date>
    </item>
  </channel>
</rss>

