Hi all,
I'm searching for a solution to the following problem:
We are receiving ORDERS-Idocs into our R/3 4.6C-system. These Idocs are processed by our own Z-function module. The function module's coding should assure that e.g. the first idoc of each day sent by a certain customer should create a new sales order (VA01), whereas the following idocs of that same customer should only add items to that sales order (VA02).
To make this work, we must make sure that no two idocs of the same sender are processed simultaneously, or even better that the function module is running only once at a time. I tried the following practices, which didn't satisfy our needs:
- create own ENQUEUE/DEQUEUE object and call the ENQUEUE at the beginning of my function module - didn't work!
- use GET PARAMETER ID to read a flag and SET PARAMETER ID to set the flag - didn't work, second idoc was too fast!
- write a record into own DB table and check existing entry with SELECT SINGLE FOR UPDATE - worked only sometimes, needs COMMIT WORK.
- check if there are any flags you can set in WE20 - couldn't find any!
Does anyone have a idea for my problem?
Greetings
Klaus