<?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: Regarding Function Module for Locking ( enque) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672529#M617159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply call it like this. The WAIT parameter needs a value of "X". It will wait a predetermined amount of time for the lock to be released, You could do this in a loop if necessary, keep checking sy-subrc untill it = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;report zrich_0001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;parameters: p_equnr type equi-equnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  call function 'ENQUEUE_EIEQUI'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      mode_equi            = 'E'&lt;/P&gt;&lt;P&gt;      mandt                = sy-mandt&lt;/P&gt;&lt;P&gt;      equnr                = p_equnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_EQUNR              = ' '&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;/UL&gt;&lt;P&gt;      _wait                = 'X'&lt;/P&gt;&lt;UL&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;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  endif.&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;Regards,&lt;/P&gt;&lt;P&gt;rewards point&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2007 11:12:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-23T11:12:16Z</dc:date>
    <item>
      <title>Regarding Function Module for Locking ( enque)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672527#M617157</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 am facing a Problem that is when iam running Call transaction one popup is coming because some other user currently editing that Tcode at that time i need to lock tcode using enque specially for table . If suppose some other user editing at that time it will shoe that popup and it will exit from their with out doing any other process For that i need Function module for Lock and Delock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;murali krishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 11:04:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672527#M617157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T11:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Function Module for Locking ( enque)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672528#M617158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please use ENQUEUE_EIEQUI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;rewards point&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 11:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672528#M617158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T11:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Function Module for Locking ( enque)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672529#M617159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply call it like this. The WAIT parameter needs a value of "X". It will wait a predetermined amount of time for the lock to be released, You could do this in a loop if necessary, keep checking sy-subrc untill it = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;report zrich_0001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;parameters: p_equnr type equi-equnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  call function 'ENQUEUE_EIEQUI'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      mode_equi            = 'E'&lt;/P&gt;&lt;P&gt;      mandt                = sy-mandt&lt;/P&gt;&lt;P&gt;      equnr                = p_equnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_EQUNR              = ' '&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;/UL&gt;&lt;P&gt;      _wait                = 'X'&lt;/P&gt;&lt;UL&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;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  endif.&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;Regards,&lt;/P&gt;&lt;P&gt;rewards point&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 11:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672529#M617159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T11:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Function Module for Locking ( enque)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672530#M617160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So in this example, I am doing a loop and check for a lock, if I don't get one, I wait for 5 seconds, this loop continues untill 30 seconds, no lock then it quits and gives message.&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;report zrich_0001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: counter type i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;parameters: p_equnr type equi-equnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  clear counter.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Exhausted,  no luch in getting a lock, get of of DO loop.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if counter &amp;gt; 6.&lt;/P&gt;&lt;P&gt;      sy-subrc = 1.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Try for lock&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function 'ENQUEUE_EIEQUI'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        mode_equi            = 'E'&lt;/P&gt;&lt;P&gt;        mandt                = sy-mandt&lt;/P&gt;&lt;P&gt;        equnr                = p_equnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   _wait                = '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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Got a lock, get out of DO loop. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   if sy-subrc  = 0.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Still here?  Then wait another 5 seconds&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    wait up to 5 seconds.&lt;/P&gt;&lt;P&gt;    counter = counter  + 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  case sy-subrc.&lt;/P&gt;&lt;P&gt;    when  0.&lt;/P&gt;&lt;P&gt;      message s001(00) with 'Lock could not be established'.&lt;/P&gt;&lt;P&gt;    when  1.&lt;/P&gt;&lt;P&gt;      message i001(00) with 'Lock could not be established'.&lt;/P&gt;&lt;P&gt;  endcase.&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;Regards,&lt;/P&gt;&lt;P&gt;rewards point&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 11:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module-for-locking-enque/m-p/2672530#M617160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T11:12:50Z</dc:date>
    </item>
  </channel>
</rss>

