‎2010 May 01 10:38 AM
Dear friends,
I'm facing a very strange situation. I've an RFC "ZRFC_UPLOAD_INSTALL_WRAPPER1". The source code of RFC is as below :
function.
DATA: lv_grp TYPE rzlli_apcl,
wait_bfr TYPE i VALUE 1,
wait_afr TYPE i VALUE 1,
des TYPE rfcdest.
data: functioncall1(1) type c.
data: done(1) type c value 'X'.
CALL FUNCTION 'ZRFC_ABAP_INSTALL_AND_RUN'
EXPORTING
mode = mode
programname = programname
function = function
TABLES
program = program
writes = writes
et_file_return = et_file_return.
ENDFUNCTION.
This wrapper function module is RFC & 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.
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 & it never get lock.
Thanks:
Gaurav
‎2010 May 01 3:51 PM
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...
‎2010 May 01 6:23 PM
HI,
Kindly see below:
Error analysis
An error occurred when executing a Remote Function Call.
"Function module currently locked by user RFCUSER "
Status of connection.... " "
Internal error code.... "RFC_GET3"
Log error: No end marker in data container.
Source Code Extratct
58
59 CALL FUNCTION 'ZRFC_ABAP_INSTALL_AND_RUN'
63 EXPORTING
64
65 mode = mode
>>>>> programname = programname
67 function = function
68 *
69 *statusmsg = lv_status
70
71 TABLES
72 program = program
73 writes = writes
74 et_file_return = et_file_return.
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
PLease help if you can suggest me something that whaty exactly gfets locked & what can be the workaround.
Thanks:
Guarav
Edited by: Rob Burbank on May 1, 2010 5:56 PM
‎2010 May 02 10:13 AM
To avoid moderator's intervention, think to PREVIEW your message before posting.
Now, about your issue, but as I could see in your original post (now truncated), your code generates a function module (?), it's probably what locks the generated 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.
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.
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.
‎2010 May 02 7:57 PM
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.
most probably this being done already just incase.
2) search for the RFC_GET3 in google i received couple of links related to this.
Since the message was moderated may be you could take the st22 in the rfc system (source code extract, active calls) and show us.
do let us know if you already have got the solution.