<?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: Reg:Lock concept in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773226#M907946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your lock object will create two FMs - ENQUEUE_&amp;lt;Lock Object&amp;gt; and DEQUEUE_&amp;lt;Lock Object&amp;gt;. The Enqueue FM should be called before you update or modify the database table for which the lock object is created. Once the necessary update is done, it should be dequeued. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to lock the entire table, then do not select any lock parameter for the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ENQUEUE_&amp;lt;Lock Object&amp;gt;&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      mode_&amp;lt;Lock Object&amp;gt; = 'E'&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;{ Work on the table and finally dequeue it}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_&amp;lt;Lock Object&amp;gt;'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      mode__&amp;lt;Lock Object&amp;gt; = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sharmila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2008 08:55:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-08T08:55:54Z</dc:date>
    <item>
      <title>Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773223#M907943</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;   Can anyone please tell me how to use Lock function module.That is I created a Lock object in se11 for a table and it generated two function modules.But the thing is how to use those function modules to lock that particular table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 07:28:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773223#M907943</guid>
      <dc:creator>former_member197425</dc:creator>
      <dc:date>2008-05-08T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773224#M907944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Nandi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It will generate two function modules i.e, ENQUEUE_EZ&amp;lt;TABLE&amp;gt; and DEQUEUE_EZ&amp;lt;TABLE&amp;gt; which you can find it in se37 ... just call ENQUEUE_EZ&amp;lt;TABLE&amp;gt; FM to lock the table before updating the table data and DEQUEUE_EZ&amp;lt;TABLE&amp;gt; to unlock after updating the table data ...&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, 08 May 2008 07:35:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773224#M907944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T07:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773225#M907945</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;TABLES  sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  text(8) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  ok_code TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE init OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'BASIC'.&lt;/P&gt;&lt;P&gt;  sflight-carrid = 'LH'. sflight-connid = '400'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE exit INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE enqueue INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'ENQUEUE'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EDEMOFLHT'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_sflight   = 'X'&lt;/P&gt;&lt;P&gt;                carrid         = sflight-carrid&lt;/P&gt;&lt;P&gt;                connid         = sflight-connid&lt;/P&gt;&lt;P&gt;                fldate         = sflight-fldate&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;      CASE sy-subrc.&lt;/P&gt;&lt;P&gt;        WHEN 0.&lt;/P&gt;&lt;P&gt;          MESSAGE i888 WITH 'Enqueue successful'(001).&lt;/P&gt;&lt;P&gt;        WHEN 1.&lt;/P&gt;&lt;P&gt;          text = sy-msgv1.&lt;/P&gt;&lt;P&gt;          MESSAGE e888 WITH 'Record already'(002) 'locked by'(003)&lt;/P&gt;&lt;P&gt;                                                   text.&lt;/P&gt;&lt;P&gt;          CALL TRANSACTION 'SM12'.&lt;/P&gt;&lt;P&gt;        WHEN 2 OR 3.&lt;/P&gt;&lt;P&gt;          MESSAGE e888 WITH 'Error in enqueue!'(004)&lt;/P&gt;&lt;P&gt;                            'SY-SUBRC:' sy-subrc.&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;    WHEN 'DEQUEUE'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EDEMOFLHT'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_sflight = 'X'&lt;/P&gt;&lt;P&gt;                carrid       = sflight-carrid&lt;/P&gt;&lt;P&gt;                connid       = sflight-connid&lt;/P&gt;&lt;P&gt;                fldate       = sflight-fldate&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                OTHERS       = 1.&lt;/P&gt;&lt;P&gt;      CASE sy-subrc.&lt;/P&gt;&lt;P&gt;        WHEN 0.&lt;/P&gt;&lt;P&gt;          MESSAGE i888 WITH 'Dequeue successful'(005).&lt;/P&gt;&lt;P&gt;        WHEN 1.&lt;/P&gt;&lt;P&gt;          MESSAGE e888 WITH 'Error in dequeue!'(006).&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;    WHEN 'SM12'.&lt;/P&gt;&lt;P&gt;      CALL TRANSACTION 'SM12'.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE select INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'SELECT'.&lt;/P&gt;&lt;P&gt;      SELECT * FROM sflight WHERE carrid = sflight-carrid&lt;/P&gt;&lt;P&gt;                              AND connid = sflight-connid&lt;/P&gt;&lt;P&gt;                              AND fldate = sflight-fldate.&lt;/P&gt;&lt;P&gt;      ENDSELECT.&lt;/P&gt;&lt;P&gt;      MESSAGE i888 WITH 'SY-SUBRC:' sy-subrc.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 08:41:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773225#M907945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T08:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773226#M907946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your lock object will create two FMs - ENQUEUE_&amp;lt;Lock Object&amp;gt; and DEQUEUE_&amp;lt;Lock Object&amp;gt;. The Enqueue FM should be called before you update or modify the database table for which the lock object is created. Once the necessary update is done, it should be dequeued. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to lock the entire table, then do not select any lock parameter for the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ENQUEUE_&amp;lt;Lock Object&amp;gt;&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      mode_&amp;lt;Lock Object&amp;gt; = 'E'&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;{ Work on the table and finally dequeue it}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_&amp;lt;Lock Object&amp;gt;'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      mode__&amp;lt;Lock Object&amp;gt; = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sharmila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 08:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773226#M907946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T08:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773227#M907947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kishore,&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;&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;&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;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock Objects are Created using Tcode SE11.&lt;/P&gt;&lt;P&gt;The Lock object name must be start with EZur name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainly lock objects are used for locking the transactions, tables --etec.&lt;/P&gt;&lt;P&gt;Multiple users can not updated the same transaction at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever u create a lock object using se11. SAP internally &lt;/P&gt;&lt;P&gt;creates a two function modules:&lt;/P&gt;&lt;P&gt;Enqueue_lockobjname ---For Locking purpose,&lt;/P&gt;&lt;P&gt;dequeue_lockobjname---For Unlocking purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U make use of these fms to lock and unlock transctions, tables..etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example is as follws:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EPORT ZLOCK_UNLOCK&lt;/P&gt;&lt;P&gt;MESSAGE-ID ZBDC.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TABLES ZSTUD.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA text(8) TYPE c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;WHEN 'SELECT'.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM ZSTUD WHERE ROLLNO = ZSTUD-ROLLNO.&lt;/P&gt;&lt;P&gt;MESSAGE i004 WITH 'SY-SUBRC:' sy-subrc.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WHEN 'ENQUEUE'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EZLOCK1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;MODE_ZSTUD = 'X'&lt;/P&gt;&lt;P&gt;ROLLNO = ZSTUD-ROLLNO&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;CASE sy-subrc.&lt;/P&gt;&lt;P&gt;WHEN 0.&lt;/P&gt;&lt;P&gt;MESSAGE i004 WITH 'Enqueue successful'(001).&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;text = sy-msgv1.&lt;/P&gt;&lt;P&gt;MESSAGE e004 WITH 'Record already'(002) 'locked by'(003)&lt;/P&gt;&lt;P&gt;text.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SM12'.&lt;/P&gt;&lt;P&gt;WHEN 2 OR 3.&lt;/P&gt;&lt;P&gt;MESSAGE e004 WITH 'Error in enqueue!'(004)&lt;/P&gt;&lt;P&gt;'SY-SUBRC:' sy-subrc.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WHEN 'DEQUEUE'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_EZLOCK1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;MODE_ZSTUD = 'X'&lt;/P&gt;&lt;P&gt;ROLLNO = ZSTUD-ROLLNO&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;CASE sy-subrc.&lt;/P&gt;&lt;P&gt;WHEN 0.&lt;/P&gt;&lt;P&gt;MESSAGE i004 WITH 'Dequeue successful'(005).&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;MESSAGE e004 WITH 'Error in dequeue!'(006).&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WHEN 'SM12'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SM12'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;MODULE STATUS_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'BASIC'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDMODULE. " STATUS_0100 OUTPUT&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 &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kalyan,&lt;/P&gt;&lt;P&gt;Reward points if usefull.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 18:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773227#M907947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T18:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773228#M907948</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 object are use in SAP to avoid the inconsistancy at the time of data is being insert or modify into the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SAP we have 3 lock objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Read Lock&lt;/P&gt;&lt;P&gt;2)Write Lock&lt;/P&gt;&lt;P&gt;3)Enhanced write Lock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create Lock object use T-Code SE11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when u create lock object system automatically creates 2 Function Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE_LOCKOBJECT NAME&lt;/P&gt;&lt;P&gt;DEQUEUE_LOCKOBJECT NAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE_LOCKOBJECT NAME : To insert the object in a queue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEQUEUE_LOCKOBJECT NAME :To remove the object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful&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;Prashanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 18:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773228#M907948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T18:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Lock concept</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773229#M907949</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;To synchronize simultaneous access by several users to the same data, the R/3 System provides a further locking mechanism in addition to database locking. &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 12:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-lock-concept/m-p/3773229#M907949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T12:35:50Z</dc:date>
    </item>
  </channel>
</rss>

