<?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 Function modules gets locked randomly, please help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916967#M1483718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,&lt;/P&gt;&lt;P&gt;       I'm facing a very strange situation. I've an RFC "ZRFC_UPLOAD_INSTALL_WRAPPER1". The source code of RFC is as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function.&lt;/P&gt;&lt;P&gt;DATA: lv_grp    TYPE rzlli_apcl,&lt;/P&gt;&lt;P&gt;wait_bfr  TYPE i  VALUE 1,&lt;/P&gt;&lt;P&gt;wait_afr  TYPE i  VALUE 1,&lt;/P&gt;&lt;P&gt;des       TYPE rfcdest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: functioncall1(1) type c.&lt;/P&gt;&lt;P&gt;data: done(1) type c value 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZRFC_ABAP_INSTALL_AND_RUN'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode           = mode&lt;/P&gt;&lt;P&gt;programname    = programname&lt;/P&gt;&lt;P&gt;function       = function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;program        = program&lt;/P&gt;&lt;P&gt;writes         = writes&lt;/P&gt;&lt;P&gt;et_file_return = et_file_return.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&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;This wrapper function module is RFC &amp;amp; gets called by JACO from non-SAP system. This wrapper function module will be called asynchronously from non-sap system which further triggers 'ZRFC_ABAP_INSTALL_AND_RUN' for other processings. We've restricted that at one point, it'll be called only 3 times. Now the problem is that it works fine for 2 cycles but suddenly when we execute the third cycle, it randomly gives an error message that Function module 'ZRFC_ABAP_INSTALL_AND_RUN' is locked by user 'RFCUSER'. This RFCUSER  is actually the user which JACO uses to connect SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway we can remove all the locks on the 'ZRFC_ABAP_INSTALL_AND_RUN' function module so that at any time anyuser can use it &amp;amp; it never get lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 May 2010 09:38:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-01T09:38:02Z</dc:date>
    <item>
      <title>Function modules gets locked randomly, please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916967#M1483718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,&lt;/P&gt;&lt;P&gt;       I'm facing a very strange situation. I've an RFC "ZRFC_UPLOAD_INSTALL_WRAPPER1". The source code of RFC is as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function.&lt;/P&gt;&lt;P&gt;DATA: lv_grp    TYPE rzlli_apcl,&lt;/P&gt;&lt;P&gt;wait_bfr  TYPE i  VALUE 1,&lt;/P&gt;&lt;P&gt;wait_afr  TYPE i  VALUE 1,&lt;/P&gt;&lt;P&gt;des       TYPE rfcdest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: functioncall1(1) type c.&lt;/P&gt;&lt;P&gt;data: done(1) type c value 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZRFC_ABAP_INSTALL_AND_RUN'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode           = mode&lt;/P&gt;&lt;P&gt;programname    = programname&lt;/P&gt;&lt;P&gt;function       = function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;program        = program&lt;/P&gt;&lt;P&gt;writes         = writes&lt;/P&gt;&lt;P&gt;et_file_return = et_file_return.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&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;This wrapper function module is RFC &amp;amp; gets called by JACO from non-SAP system. This wrapper function module will be called asynchronously from non-sap system which further triggers 'ZRFC_ABAP_INSTALL_AND_RUN' for other processings. We've restricted that at one point, it'll be called only 3 times. Now the problem is that it works fine for 2 cycles but suddenly when we execute the third cycle, it randomly gives an error message that Function module 'ZRFC_ABAP_INSTALL_AND_RUN' is locked by user 'RFCUSER'. This RFCUSER  is actually the user which JACO uses to connect SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway we can remove all the locks on the 'ZRFC_ABAP_INSTALL_AND_RUN' function module so that at any time anyuser can use it &amp;amp; it never get lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 May 2010 09:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916967#M1483718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-01T09:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function modules gets locked randomly, please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916968#M1483719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you give more information about the lock message (number and all details), because function modules don't "get locked", there must be something else...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 May 2010 14:51:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916968#M1483719</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-01T14:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Function modules gets locked randomly, please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916969#M1483720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;  Kindly see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    An error occurred when executing a Remote Function Call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    "Function module currently locked by user RFCUSER "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Status of connection.... " "&lt;/P&gt;&lt;P&gt;    Internal error code.... "RFC_GET3"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Log error: No end marker in data container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source Code Extratct&lt;/P&gt;&lt;P&gt;   58&lt;/P&gt;&lt;P&gt;   59 CALL FUNCTION 'ZRFC_ABAP_INSTALL_AND_RUN'&lt;/P&gt;&lt;P&gt;    63 EXPORTING&lt;/P&gt;&lt;P&gt;   64&lt;/P&gt;&lt;P&gt;   65 mode           = mode&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; programname    = programname&lt;/P&gt;&lt;P&gt;   67 function       = function&lt;/P&gt;&lt;P&gt;   68 *&lt;/P&gt;&lt;P&gt;   69 *statusmsg =   lv_status&lt;/P&gt;&lt;P&gt;   70&lt;/P&gt;&lt;P&gt;   71 TABLES&lt;/P&gt;&lt;P&gt;   72 program        = program&lt;/P&gt;&lt;P&gt;   73 writes         = writes&lt;/P&gt;&lt;P&gt;   74 et_file_return = et_file_return.&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;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease help if you can suggest me something that whaty exactly gfets locked &amp;amp; what can be the workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:&lt;/P&gt;&lt;P&gt;Guarav&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 1, 2010 5:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 May 2010 17:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916969#M1483720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-01T17:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function modules gets locked randomly, please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916970#M1483721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To avoid moderator's intervention, think to PREVIEW your message before posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, about your issue, but as I could see in your original post (now truncated), your code &lt;STRONG&gt;generates a function module&lt;/STRONG&gt; (?), it's probably what locks the &lt;STRONG&gt;generated&lt;/STRONG&gt; function module (or its function group). I'm not sure the way you do is correct, insert report should not be used for function modules.&lt;/P&gt;&lt;P&gt;I can't say what causes the lock, maybe you can use DEQUEUE_ALL function module to unlock everything. Moreover, I see in your code that there is a wait, so maybe  there is an update task (that is asynchronous) somewhere, locks are retained until the end of the update task, so dequeue only after that.&lt;/P&gt;&lt;P&gt;If it works, then try to see what lock object is really used, I think that's a better practice to code precisely. You may use SM12 to check locks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 09:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916970#M1483721</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-02T09:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Function modules gets locked randomly, please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916971#M1483722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) check what the RFC function module does. If it is indeed creating a new function module i would suggest you to check if the function module already exists via fn module "FUNCTION_EXIST" if not present then go ahead with your generation.&lt;/P&gt;&lt;P&gt;most probably this being done already just incase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) search for the RFC_GET3 in google i received couple of links related to this.&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="5737106"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the message was moderated may be you could take the st22 in the rfc system (source code extract, active calls) and show us.&lt;/P&gt;&lt;P&gt;do let us know if you already have got the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 18:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-gets-locked-randomly-please-help/m-p/6916971#M1483722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-02T18:57:25Z</dc:date>
    </item>
  </channel>
</rss>

