‎2007 Aug 08 10:09 AM
Hi all,
I'm having a problem with executing a function module. The FM is CO_RI_CONFIRMATION_CREATE which is used for order confirmation create. I'm using OO in my program and the call to this FM is being written in a method.
My requirement is I need to confirm 3 orders consequtively, so what I did is I called this method (which contain my FM) 3 consequtive time. The problem is when I execute my program, the first order will always be successfully confirmed, and the 2nd order will always fail. However when I keep repeating it, it will then eventually success.
The funny thing is, when I try to debug and step in to the code and execute it line by line, all 3 orders are successfully confirmed.
Why is the 2nd order fails to confirm when the program is being executed normally? I looks like the first process of confirming the order is not actually completed at the background. I did try to include COMMIT WORK AND WAIT, but still it's not working.
Any kind of help is very much appreciated.
‎2007 Aug 08 10:17 AM
Hi,
after update insert the following code
CALL FUNCTION 'RZL_SLEEP'.
this will work fine
‎2007 Aug 08 10:18 AM
Hi Mil,
do you try to set the paramater: WAIT_ON_COMMIT of this FM?
Regards, Dieter
‎2007 Aug 08 10:31 AM
Hi Deiter,
Yes, your idea works! I didn't even noticed that there's such parameter for this FM. By the way, I even try BAPI_TRANSACTION_COMMIT with WAIT = X and it still didn't work. Funny.
‎2007 Aug 08 10:43 AM
Hi Mil,
good that it works.
What about rewards points to them they help you.
Regards, Dieter
‎2007 Aug 08 10:18 AM
use BAPI_TRANSACTION_COMMIT AND GIVE wait parameter as 'X'.
u'r problem will definitely be solved.
don't forget to reward
Sameer