Do we have Synchronized PERFORMS in ABAP?

Question: Dear Friends,

Do we have any kind of SYNCHRONIZE method of JAVA in ABAP? We have a problem of simultaneous duplicate RFC calls from our legacy system. We wanted to restrict these calls. I want to write a subroutine, which can be called by all the instances of the calls one by one only. If one call is made, we want to make a dummy entry in a ZTable, so that other call may proceed according to the data existing in the ZTable.

We tried with the Lock objects, but I feel with the lock objects, it is not
possible as if we don't have any entry in the ZTable with the field values what we have passed, it obviously fails to lock.

I would really appreciate your replies in this regard.

Thanking you forward,
BSR

Answer:
You don't really give us much to go on, but as a starting point, can you use the (non table) input parameters of the function call as entries in a custom table? The table would be keyed on all of these. As the program starts it checks the table for an entry. If there's one there it waits for a while and checks again (or exits without doing anything).

If there's no entry then it inserts one, runs, and then deletes it.

The other interpretation of what you want appears to say that the first call should place an entry in the table and the second should action it.

Again, that's easy enough. Instead of waiting if there's an entry there then the program runs and deletes the entry. If there's no entry, and entry is made and the program exits.
_________________
Regards

R


Abap KC
SFMDR

Answer:
I would prefer using lock objects instead of DB updates.

Answer:
Hi R,

You have exactly pointed out the problem what I mean to explain.

Thank you very much for your inputs.

In fact I have coded to remove this bug as nearly what you have proposed me to do, but at that I am not sure about to what extent it will work and its consistency. After I have modified, I have tested the RFC from simultaneous machines with the same input, and it was working fine now.

Regards,
BSR

Answer:
Dear Friends,

SYNCHRONIZE method of JAVA in ABAP?

How about the call waiting! You haven't achieved that like in java!
Copyright ?2007 - 2008 www.jt77.com