Trying to synchronize objects between SAP and another system (ENQUEUE/DEQUEUE)
Posted on 2004-03-26
I know that the non-SAP system can use the ENQUEUE_XYZ lock object function to keep SAP users out of the data while the non-SAP system “owns” the object, but I’m getting stuck when I want to replicate the changes in SAP. I have to DEQUEUE the lock object before I can call the BAPI or run the CALL_TRANSACTION to save the changes from the non-SAP system back into SAP. The problem is that there will be some (admittedly small) amount of time between my DEQUEUE and the BAPI or BDC’s lock. This means that it is possible that someone else could grab the object and make a change during that time, and then my BAPI or BDC would overwrite that change. Am I missing something about ENQUEUE/DEQUEUE here? I was hoping that SAP would realize that the same user that had originally requested the ENQUEUE was the one trying to do the update, but I guess this isn’t working because the BAPI/BDC takes place in its own LUW. Any ideas would be appreciated.