Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

while processing C015 - Getting Error 'Reservation 000005089 is already being Processed "

Former Member
0 Likes
5,665

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,683

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

10 REPLIES 10
Read only

Former Member
0 Likes
3,683

Hi,

do you have a COMMIT WORK AND WAIT between the transaction calls?

Regards,

Klaus

Read only

0 Likes
3,683

After every record update in MB1A ,  i had included the statement "commit work and WAIT " . But still i am getting the same error.

Read only

Former Member
0 Likes
3,684

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

Read only

0 Likes
3,683

this function to be called before executing BAPI or after executing BAPI  or before commit on each record in Bapi.

Read only

0 Likes
3,683

Hello Murali,

Enqueu_EMRKPF before bapi call and deque*emrkpf after transaction commit.

Thanks

Read only

0 Likes
3,683

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

Read only

0 Likes
3,683

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

Read only

0 Likes
3,683

Hi,

please check, if you can see a lock in SE12. If yes, check the user (your user, wokflow user, ...).

Regards,

Klaus

Read only

0 Likes
3,683

Checked in SM12 , there is no LOCKS ..

Regards,

Murali

Read only

0 Likes
3,683

Finally noted there was some issue in variable refresh , that has been fixed. now.

Thanks klaus.