<?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: table locking ?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176624#M998459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use the function modules ENQUEUE_E_TABLE for locking tables and the function module DEQUEUE_E_TABLE for unlocking tables. With this method, we don't need to lock objects in order to lock the tables. In other words, any table can be locked/unlocked using these function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;&lt;U&gt;Locking Table&lt;/U&gt;&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  varkey like rstable-varkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  varkey = sy-mandt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;locking the tables............................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MODE_RSTABLE         = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   tabname              = 'MARA'&lt;/P&gt;&lt;P&gt;   varkey               = varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_TABNAME            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_VARKEY             = ' '&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             = 'X'&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;          .&lt;/P&gt;&lt;P&gt;  case sy-subrc.&lt;/P&gt;&lt;P&gt;    when 1.&lt;/P&gt;&lt;P&gt;        message i184(bctrain) with 'Foreignlock'.&lt;/P&gt;&lt;P&gt;    when 2.&lt;/P&gt;&lt;P&gt;      message i184(bctrain) with 'system failure'.&lt;/P&gt;&lt;P&gt;    when 0.&lt;/P&gt;&lt;P&gt;      message i184(bctrain) with 'success'.&lt;/P&gt;&lt;P&gt;        when others.&lt;/P&gt;&lt;P&gt;        message i184(bctrain) with 'others'.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&lt;U&gt;unlocking the table&lt;/U&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MODE_RSTABLE       = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     tabname            = 'MARA'&lt;/P&gt;&lt;P&gt;     varkey             =  varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_TABNAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_VARKEY           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _SCOPE             = '3'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _SYNCHRON          = ' '&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;       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jul 2008 17:00:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-14T17:00:54Z</dc:date>
    <item>
      <title>table locking ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176622#M998457</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;I have a couple of custom tables and many users are going to deal with a custom transaction which will be using these tables. Simultaneous access is possible. I have to handle table locking issues ? What are the issues and what are the best ways to handle the same ? Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 16:54:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176622#M998457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-14T16:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: table locking ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176623#M998458</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 lock objects for the tables in SE11..Then use the enqueue function module to lock the record and dequeue function module to unlock the record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Dequeue and enqueue function modules will be automatically generated when the lock object is activated in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the standard sap help to create lock objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 16:57:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176623#M998458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-14T16:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: table locking ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176624#M998459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use the function modules ENQUEUE_E_TABLE for locking tables and the function module DEQUEUE_E_TABLE for unlocking tables. With this method, we don't need to lock objects in order to lock the tables. In other words, any table can be locked/unlocked using these function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;&lt;U&gt;Locking Table&lt;/U&gt;&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  varkey like rstable-varkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  varkey = sy-mandt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;locking the tables............................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MODE_RSTABLE         = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   tabname              = 'MARA'&lt;/P&gt;&lt;P&gt;   varkey               = varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_TABNAME            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_VARKEY             = ' '&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             = 'X'&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;          .&lt;/P&gt;&lt;P&gt;  case sy-subrc.&lt;/P&gt;&lt;P&gt;    when 1.&lt;/P&gt;&lt;P&gt;        message i184(bctrain) with 'Foreignlock'.&lt;/P&gt;&lt;P&gt;    when 2.&lt;/P&gt;&lt;P&gt;      message i184(bctrain) with 'system failure'.&lt;/P&gt;&lt;P&gt;    when 0.&lt;/P&gt;&lt;P&gt;      message i184(bctrain) with 'success'.&lt;/P&gt;&lt;P&gt;        when others.&lt;/P&gt;&lt;P&gt;        message i184(bctrain) with 'others'.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&lt;U&gt;unlocking the table&lt;/U&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MODE_RSTABLE       = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     tabname            = 'MARA'&lt;/P&gt;&lt;P&gt;     varkey             =  varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_TABNAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_VARKEY           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _SCOPE             = '3'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _SYNCHRON          = ' '&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;       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 17:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-locking/m-p/4176624#M998459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-14T17:00:54Z</dc:date>
    </item>
  </channel>
</rss>

