ā2007 Aug 09 4:57 AM
Hi friends,
I am creating sales order and based on sales order delivery and based on delivery invoice in one program through BDC by calling different transactions using call transaction method If I run this program in mode A it is working fine but if I run in mode N sales order is creating properly but while creating delivery getting the message like sales order is currently editing by my user id. Thats why delivery is not creating. I had given wait command for 4 seconds before call transaction vl01n and call transaction vf01 that time if I run multiple materials or materials with different batches for some batches sales order delivery invoice is creating properly and for some other batches getting the same message like sales order is currently editing by Can I extend wait command to few more seconds or please tell me the best solution to resolve this problem.
Thanks to all.
ā2007 Aug 09 5:05 AM
u can used hardcode.
commit work.
wait 5.
Message was edited by:
Karthikeyan Pandurangan
ā2007 Aug 09 5:06 AM
Hi..
After each Call transaction statement use the statement
COMMIT WORK AND WAIT.
This may work for u.
<b>Reward if Helpful</b>
ā2007 Aug 09 5:07 AM
Yes mode A it will work fine, now coming to MODE N it will have a problem as you told.. this is bacause sales order is getting created and you are running the delivery with the same order...to avoid this... try like this
Do 5 times.
***TIMER 4 seconds
***READ YOUR MESSAGEs..
IF SALES ORDER CREATED.
EXIT.
ENDIF.
ENDDO.
This is rough idea.. this will solve your problem instead of increasing the timer.. if it is getting created.. then it will wait... if created it will proceed with out waiting any long...
Why I am using 5 times instead of n times is sometimes Sales order may me locked by someother user... to avoid, infinite loop I am using 5 times..
OR
AFTER CALL transaction use,
COMMIT WORK AND WAIT.
Close the thread if your question is answered,
Regards,
SaiRam