<?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: locking the database tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547454#M579593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create lock objects for your custom table using SE11. Make sure the following thigs&lt;/P&gt;&lt;P&gt;the lock object name should start with E.&lt;/P&gt;&lt;P&gt;Once you create the lock object, you will be created two FM's ENQUEUE&amp;lt;Lock Object Name&amp;gt;&lt;/P&gt;&lt;P&gt;and DEQUEUE&amp;lt;Lock Object Name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use those FM's to lock and unlock your custom tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2007 05:45:27 GMT</pubDate>
    <dc:creator>gopi_narendra</dc:creator>
    <dc:date>2007-07-09T05:45:27Z</dc:date>
    <item>
      <title>locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547448#M579587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to lock a database table. I assume that standard SAP tables have ENQUEUE fm.. I need to do for custom tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547448#M579587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547449#M579588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOU CREATE LOCK OBJECTS FOR THE CUSTOM TABLES.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:41:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547449#M579588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547450#M579589</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;Good ... check out the following documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock objects are used to lock the database table while making the modifications on the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create your own lock objects using SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create lock objects on any table system will create two function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.ENQUEUE....&lt;/P&gt;&lt;P&gt;2.DEQUEUE.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first one is used to lock the table&lt;/P&gt;&lt;P&gt;second one used to removing lock on the table.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;lock Table&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tabname = table_name&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;Unlock Table&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tabname = table_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_SCOPE = 1: The lock is not sent to the update program. The lock is removed when the transaction is ended. &lt;/P&gt;&lt;P&gt;_SCOPE = 2: The lock is sent to the update program. The update program is responsible for removing the lock. The dialog program which requested the lock no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module. &lt;/P&gt;&lt;P&gt;_SCOPE = 3: The lock &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="3078269"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Managingin lock entries&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cb/168237d30d974be10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cb/168237d30d974be10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547450#M579589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547451#M579590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;You can use ENQUEUE for custom tables also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547451#M579590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547452#M579591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;FORM LOCK_ZFISVTAX_GPA_VOL.
  CLEAR : V_FLAG.
* Lock database table ZFISVTAX_GPA_VOL
  CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
            MODE_RSTABLE   = C_E
            TABNAME        = C_GPA_VOL
       EXCEPTIONS
            FOREIGN_LOCK   = 1
            SYSTEM_FAILURE = 2
            OTHERS         = 3.
  IF SY-SUBRC = 0.
    V_FLAG = 'X'.
  ELSEIF SY-SUBRC = 1.
    MESSAGE E000 WITH TEXT-026 C_GPA_VOL
                      TEXT-027.
  ELSEIF SY-SUBRC = 2.
    MESSAGE E000 WITH TEXT-026 C_GPA_VOL
                      TEXT-028.
  ELSEIF SY-SUBRC = 3.
    MESSAGE E000 WITH TEXT-026 C_GPA_VOL
                      TEXT-029.
  ENDIF.
ENDFORM.                    " LOCK_ZFISVTAX_GPA_VOL


FORM UNLOCK_ZFISVTAX_GPA_VOL.

* Unlock database table ZFISVTAX_GPA_VOL
  CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
            MODE_RSTABLE = C_E
            TABNAME      = C_GPA_VOL.
ENDFORM.                    " UNLOCK_ZFISVTAX_GPA_VOL


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Santosh Kumar Patha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:42:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547452#M579591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547453#M579592</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 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;&amp;lt;b&amp;gt;This will autogenerate two function modules,Enqueue &amp;lt; lock object &amp;gt; and Dequeue &amp;lt; lock object &amp;gt;&amp;lt;/b&amp;gt;&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;Eg:&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;&amp;lt;b&amp;gt;TO LOCK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute CALL FUNCTION statement&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;EXCEPTIONS . . .&lt;/P&gt;&lt;P&gt;CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TO UNLOCK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Execute the CALL FUNCTION statement&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;It is important to unlock the entry so others can update it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:44:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547453#M579592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547454#M579593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create lock objects for your custom table using SE11. Make sure the following thigs&lt;/P&gt;&lt;P&gt;the lock object name should start with E.&lt;/P&gt;&lt;P&gt;Once you create the lock object, you will be created two FM's ENQUEUE&amp;lt;Lock Object Name&amp;gt;&lt;/P&gt;&lt;P&gt;and DEQUEUE&amp;lt;Lock Object Name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use those FM's to lock and unlock your custom tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547454#M579593</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-07-09T05:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: locking the database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547455#M579594</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;HR originaltext="--------" /&gt;&lt;P&gt;lock Table&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tabname = table_name&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; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;Unlock Table&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tabname = table_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer below link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=3716278&amp;amp;messageID=2354907" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=3716278&amp;amp;messageID=2354907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 05:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-the-database-tables/m-p/2547455#M579594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T05:45:38Z</dc:date>
    </item>
  </channel>
</rss>

