<?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: function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318455#M1029112</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;We Use the FM ENQUEUE_E_TABLE when you want to lock the table..&lt;/P&gt;&lt;P&gt;and the FM 'DEQUEUE_E_TABLE' to unlock it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create a lock object for you table via SE11, doing so, creates two function modules, an ENQUEUE function module and a DEQUEUE funciton module. When you want to lock a table entry, you simply call the ENQUEUE function module for that lock object and pass the values in which are the key of the record that you want to lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/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_nw2004s/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm&lt;/A&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;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="301692"&gt;&lt;/A&gt;&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;Omkaram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2008 06:39:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-01T06:39:01Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318452#M1029109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sdn members,&lt;/P&gt;&lt;P&gt;                            can any one say the funtionality of DEQUEUE_E_TABLE.&lt;/P&gt;&lt;P&gt;&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, 01 Sep 2008 06:28:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318452#M1029109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T06:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318453#M1029110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this FM is used to unlock database table.if updation is completed then you need to unlock that table for further process that time this FM is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When need to update a database table ENQUEUE FM is used this will lock that table for updation so anybody else will not be able to update same table.other person can view data but can not update if it is locked by this FM but after completing updation we should unlock that table so for that DEQUEUE FM is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 06:36:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318453#M1029110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T06:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318454#M1029111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elias,&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. Sample code is given below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report z_enqueue.

* testing the locking of tables...
data:
  varkey like rstable-varkey.

  varkey = sy-mandt.

* locking the tables............................
call function 'ENQUEUE_E_TABLE'
 exporting
*   MODE_RSTABLE         = 'E'
   tabname              = 'MARA'
   varkey               = varkey
*   X_TABNAME            = ' '
*   X_VARKEY             = ' '
*   _SCOPE               = '2'
*   _WAIT                = ' '
*   _COLLECT             = 'X'
 exceptions
   foreign_lock         = 1
   system_failure       = 2
   others               = 3
          .
  case sy-subrc.
    when 1.
        message i184(bctrain) with 'Foreignlock'.
    when 2.
      message i184(bctrain) with 'system failure'.
    when 0.
      message i184(bctrain) with 'success'.
        when others.
        message i184(bctrain) with 'others'.
  endcase.

* unlocking the table...............

  call function 'DEQUEUE_E_TABLE'
   exporting
*     MODE_RSTABLE       = 'E'
     tabname            = 'MARA'
     varkey             =  varkey
*     X_TABNAME          = ' '
*     X_VARKEY           = ' '
*     _SCOPE             = '3'
*     _SYNCHRON          = ' '
*     _COLLECT           = ' '  .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 06:38:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318454#M1029111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T06:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318455#M1029112</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;We Use the FM ENQUEUE_E_TABLE when you want to lock the table..&lt;/P&gt;&lt;P&gt;and the FM 'DEQUEUE_E_TABLE' to unlock it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create a lock object for you table via SE11, doing so, creates two function modules, an ENQUEUE function module and a DEQUEUE funciton module. When you want to lock a table entry, you simply call the ENQUEUE function module for that lock object and pass the values in which are the key of the record that you want to lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/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_nw2004s/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm&lt;/A&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;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="301692"&gt;&lt;/A&gt;&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;Omkaram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 06:39:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4318455#M1029112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T06:39:01Z</dc:date>
    </item>
  </channel>
</rss>

