<?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 objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780249#M909595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u give the function module sample how to use tht&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2008 04:47:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-07T04:47:00Z</dc:date>
    <item>
      <title>Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780246#M909592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;       I was inserting in five tables simaltenously..If 10 members at the same time when they click the button means its throwing error..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i need to use lock objects..If one enters tht loop of inserting to tables,it must want to not to allow others inside tht..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help how to use this and implement in the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 04:31:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780246#M909592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780247#M909593</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;Create a lock object via SE11-&amp;gt;Lock object and call the ENQUEUE_EZ_&amp;lt;TABLE&amp;gt; before updating the table and DEQUEUE_EZ_&amp;lt;TABLE&amp;gt; to unlock after updating the table ...&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>Wed, 07 May 2008 04:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780247#M909593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780248#M909594</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;Create the lock object for your requirement (EZ......)&lt;/P&gt;&lt;P&gt;After activating the lockobject it will generate the two function module like ENQUE_EZ.......&lt;/P&gt;&lt;P&gt;                  DEQUE_EZ........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you want to process the record you just call the first function module and lock the table .... for your entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after processing the same to unlock the table call the second function module.&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;Madan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 04:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780248#M909594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780249#M909595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u give the function module sample how to use tht&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 04:47:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780249#M909595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780250#M909596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT i_zrem_alloc_updat_x.&lt;/P&gt;&lt;P&gt;    CLEAR i_zrem_alloc_updat_x-lock_message.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'ENQUEUE_EZREMALLOCUPDAT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        mode_zrem_alloc_updat       = 'E'&lt;/P&gt;&lt;P&gt;        mandt                       = sy-mandt&lt;/P&gt;&lt;P&gt;        ext_ref_no                  = i_zrem_alloc_updat_x-ext_ref_no&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     X_EXT_REF_NO                = ' '&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;/UL&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      i_zrem_alloc_updat_x-icon_name   = 'ICON_LOCKED'.&lt;/P&gt;&lt;P&gt;      SELECT SINGLE text FROM t100 INTO i_zrem_alloc_updat_x-lock_message&lt;/P&gt;&lt;P&gt;                                WHERE sprsl = 'E'&lt;/P&gt;&lt;P&gt;                                  AND arbgb = sy-msgid&lt;/P&gt;&lt;P&gt;                                  AND msgnr = sy-msgno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 04:49:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780250#M909596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780251#M909597</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 want kep lock on 5tables right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first select primary table among 5 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First create lock object starting with ez or ey .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to se11 enter name press create.&lt;/P&gt;&lt;P&gt;there enter primary table  and select exclusive not cumulative mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;press add button enter remaining tables .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after activate that lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will restrict from other users access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after we can request lock explicitly in abap program using enqueue_lockobject and dequeue_lockobject.&lt;/P&gt;&lt;P&gt;but we can request lock on single table link has to create in se11 using lock object for other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requesting an SAP lock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a lock object obj is activated, two function modules (see CALL&lt;/P&gt;&lt;P&gt;FUNCTION) with the names ENQUEUE_obj and DEQUEUE_obj are generated.&lt;/P&gt;&lt;P&gt;These lock modules are used to explicitly request or release SAP locks&lt;/P&gt;&lt;P&gt;in an ABAP program. The SAP lock concept thus assumes a cooperative&lt;/P&gt;&lt;P&gt;behavior by all the programs involved. This means that access from&lt;/P&gt;&lt;P&gt;programs that do not call the specified modules are not protected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lock conditions and lock modes for the requested locks are defined&lt;/P&gt;&lt;P&gt;by the IMPORT parameters of the lock modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lock conditions are defined by the lock parameters of the lock&lt;/P&gt;&lt;P&gt;object. If the lock object has only one base table, each primary key&lt;/P&gt;&lt;P&gt;field of the table corresponds to exactly one lock parameter. Apart from&lt;/P&gt;&lt;P&gt;this, a lock parameter corresponds to a group of primary key fields that&lt;/P&gt;&lt;P&gt;are identified by the join conditions. For each lock parameter par, the&lt;/P&gt;&lt;P&gt;lock modules have two IMPORT parameters with the names par and X_par.&lt;/P&gt;&lt;P&gt;The lock condition is defined by these parameters. If a parameter par is&lt;/P&gt;&lt;P&gt;not defined or if it is defined with the initial value, this means that&lt;/P&gt;&lt;P&gt;the corresponding key fields should be locked generically. If you really&lt;/P&gt;&lt;P&gt;want to lock the key field with the initial value, you must also define&lt;/P&gt;&lt;P&gt;the parameter X_par with the value 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define the lock modes, the lock modules have an IMPORT parameter&lt;/P&gt;&lt;P&gt;MODE_tab for each base table tab, with which the lock mode for this&lt;/P&gt;&lt;P&gt;table can be defined. A default value must already be set for this&lt;/P&gt;&lt;P&gt;parameter in the definition of the lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is second procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each explicit locking process assumes that all programs which perform database accesses work together in a cooperative manner. If a program does not behave in this way, i.e. it reads or changes data without locking it beforehand, this may result in a conflict with another program, even this other program has locked data correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following program fragment presents a solution to this problem: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: SFLIGHT, SBOOK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_ESFLIGHT' &lt;/P&gt;&lt;P&gt;  EXPORTING    MANDT        = SY-MANDT &lt;/P&gt;&lt;P&gt;               CARRID       = 'LH' &lt;/P&gt;&lt;P&gt;               CONNID       = '0400' &lt;/P&gt;&lt;P&gt;               FLDATE       = '19960516' &lt;/P&gt;&lt;P&gt;               MODE_SFLIGHT = 'E' &lt;/P&gt;&lt;P&gt;  EXCEPTIONS   FOREIGN_LOCK = 1 &lt;/P&gt;&lt;P&gt;               OTHERS       = 2. &lt;/P&gt;&lt;P&gt;CASE SY-SUBRC. &lt;/P&gt;&lt;P&gt;  WHEN 1. ... &lt;/P&gt;&lt;P&gt;  WHEN 2. ... &lt;/P&gt;&lt;P&gt;ENDCASE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM SFLIGHT &lt;/P&gt;&lt;P&gt;  WHERE &lt;/P&gt;&lt;P&gt;    CARRID   = 'LH'       AND &lt;/P&gt;&lt;P&gt;    CONNID   = '0400'     AND &lt;/P&gt;&lt;P&gt;    FLDATE   = '19960516'. &lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;  MESSAGE E... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SFLIGHT-SEATSOCC &amp;lt; SFLIGHT-SEATSMAX. &lt;/P&gt;&lt;P&gt;  SBOOK-CARRID = 'LH'. &lt;/P&gt;&lt;P&gt;  SBOOK-CONNID = '0400'. &lt;/P&gt;&lt;P&gt;  SBOOK-FLDATE = '19960516'. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  INSERT SBOOK. &lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    MESSAGE E... &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  UPDATE SFLIGHT &lt;/P&gt;&lt;P&gt;    SET &lt;/P&gt;&lt;P&gt;      SEATSOCC = SEATSOCC + 1 &lt;/P&gt;&lt;P&gt;    WHERE &lt;/P&gt;&lt;P&gt;      CARRID   = 'LH '      AND &lt;/P&gt;&lt;P&gt;      CONNID   = '0400'     AND &lt;/P&gt;&lt;P&gt;      FLDATE   = '19960516'. &lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt;  MESSAGE E... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_ESFLIGHT' &lt;/P&gt;&lt;P&gt;  EXPORTING    MANDT        = SY-MANDT &lt;/P&gt;&lt;P&gt;               CARRID       = 'LH' &lt;/P&gt;&lt;P&gt;               CONNID       = '0400' &lt;/P&gt;&lt;P&gt;               FLDATE       = '19960516' &lt;/P&gt;&lt;P&gt;               MODE_SFLIGHT = 'E'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK. &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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Reward points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jeevitha on May 7, 2008 10:27 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jeevitha on May 7, 2008 10:33 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jeevitha on May 7, 2008 10:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 04:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780251#M909597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T04:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780252#M909598</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;Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Provide three type of Lock objects. &lt;/P&gt;&lt;P&gt;- Read Lock(Shared Locked) &lt;/P&gt;&lt;P&gt;protects read access to an object. The read lock allows other transactions read access but not write access to &lt;/P&gt;&lt;P&gt;the locked area of the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Write Lock(exclusive lock) &lt;/P&gt;&lt;P&gt;protects write access to an object. The write lock allows other transactions neither read nor write access to &lt;/P&gt;&lt;P&gt;the locked area of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Enhanced write lock (exclusive lock without cumulating) &lt;/P&gt;&lt;P&gt;works like a write lock except that the enhanced write lock also protects from further accesses from the &lt;/P&gt;&lt;P&gt;same transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technicaly: &lt;/P&gt;&lt;P&gt;When you create a lock object System automatically creat two function module. &lt;/P&gt;&lt;P&gt;1. ENQUEUE_&amp;lt;Lockobject name&amp;gt;. to insert the object in a queue. &lt;/P&gt;&lt;P&gt;2. DEQUEUE_&amp;lt;Lockobject name&amp;gt;. To remove the object is being queued through above FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use these function module in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:vbak.&lt;/P&gt;&lt;P&gt;call function 'ENQUEUE_EZLOCK3'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;mode_vbak = 'E'&lt;/P&gt;&lt;P&gt;mandt = sy-mandt&lt;/P&gt;&lt;P&gt;vbeln = vbak-vbeln&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_VBELN = ' '&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;Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:&lt;/P&gt;&lt;P&gt;1. enque_lockobject&lt;/P&gt;&lt;P&gt;1. deque_lockobject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;GO TO SE11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the radio button "Lock object"..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the name starts with EZ or EY..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: EYTEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press Create button..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the short description..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: Lock object for table ZTABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the tables tab..Give the table name..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: ZTABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and generate..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your lock object is now created..You can see the LOCK MODULES..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the menu ..GOTO -&amp;gt; LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock objects: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Match Code Objects:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these links -&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="3036414"&gt;&lt;/A&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="2912662"&gt;&lt;/A&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="3005172"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;vasavi.v&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 05:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/3780252#M909598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T05:01:07Z</dc:date>
    </item>
  </channel>
</rss>

