2014 Jul 03 5:19 AM
Hello,
I have created a customized Program script which will process MB1A , MIGO and CO15 simultaneously
MB1A - using BAPI
MIGO and CO15 using BADI
When i process for few records everything works fine. But when i process for 2000 records , after processing i am getting error at C015 "Reservation 000005089 is already being Processed".
I tried with wait time up to 8 seconds after MB1A , still i am getting same error.
Can any one suggest how to fix the issue.
BR,
Murali
2014 Jul 03 5:37 AM
Hi,
you can do a wait loop, where you call fm CO_ZF_RESERVATION_LOCK or fm ENQUEUE_EMRKPF until the reservation is locked no more. But don't forget to call DEQUEUE_EMRKPF after that.
Regards,
Klaus
Hello,
I have created a customized Program script which will process MB1A , MIGO and CO15 simultaneously
MB1A - using BAPI
MIGO and CO15 using BADI
When i process for few records everything works fine. But when i process for 2000 records , after processing i am getting error at C015 "Reservation 000005089 is already being Processed".
I tried with wait time up to 8 seconds after MB1A , still i am getting same error.
Can any one suggest how to fix the issue.
BR,
Murali
2014 Jul 03 5:27 AM
Hi,
do you have a COMMIT WORK AND WAIT between the transaction calls?
Regards,
Klaus
2014 Jul 03 5:34 AM
After every record update in MB1A , i had included the statement "commit work and WAIT " . But still i am getting the same error.
2014 Jul 03 5:37 AM
Hi,
you can do a wait loop, where you call fm CO_ZF_RESERVATION_LOCK or fm ENQUEUE_EMRKPF until the reservation is locked no more. But don't forget to call DEQUEUE_EMRKPF after that.
Regards,
Klaus
2014 Jul 03 6:06 AM
this function to be called before executing BAPI or after executing BAPI or before commit on each record in Bapi.
2014 Jul 03 6:10 AM
Hello Murali,
Enqueu_EMRKPF before bapi call and deque*emrkpf after transaction commit.
Thanks
2014 Jul 03 6:26 AM
Hi Murali,
do a wait loop before calling CO15 like:
locked = 'X'.
do.
wait up to 5 seconds.
CALL FUNCTION 'ENQUEUE_EMRKPF'
EXPORTING RSNUM = your_rsnum
X_RSNUM = 'X'
EXCEPTIONS FOREIGN_LOCK = 2
SYSTEM_FAILURE = 3.
if sy-subrc EQ 0.
clear locked.
CALL FUNCTION 'DEQUEUE_EMMKPF'.
exit.
endif.
enddo.
Regards,
Klaus
2014 Jul 03 7:34 AM
Hi Klaus,
i had made loop for 60 secs wait time (after executing MB1A BAPI) , still i am getting the same Error.
First system will process 2000 records in MB1A through BAPI , after that system process the same set of records in MIGO through BDC and finally process CO15 through BDC.
MB1A get processed , MIGO get processed , i am getting error while executing C015. Even after making 60 Sec wait time , still i am getting the same Error.
Can you suggest pl.
BR,
Murali
2014 Jul 03 7:37 AM
Hi,
please check, if you can see a lock in SE12. If yes, check the user (your user, wokflow user, ...).
Regards,
Klaus
2014 Jul 03 7:43 AM
2014 Jul 04 4:53 AM
Finally noted there was some issue in variable refresh , that has been fixed. now.
Thanks klaus.