‎2011 Oct 12 4:05 PM
Hi all,
A program I have created is required to create multiple orders during a typical run. This was working perfectly issue started after upgrading to EhP5 However, in all systems, it is able to create the first order but every order after that gets an abort message.
"New object number is temporary"
Is there a configuration change that needs to be made from ? If so, what do I need to do to fix this?
For example, if I have ten order numbered 1 through 10 and we process them, number 1 will be created. However, order 2 through 10 will be aborted with the same abort message. Again, this was working before EhP5. Opened a OSS ticket but no help as this is considered as an issue in cutom program. I am not knowing what is the issue.
Program is using BAPI_SALESDOCU_CREATEFROMDATA and BAPI commit is also used.
Getting below message in SAPinbox.
Update key... 3187F3E070BFF1668F01005056BB622E
Generated.... 10.10.2011, 17:34:14
Completed.... 10.10.2011, 17:34:15
Error Info... VL 503: Error during DELETE VBUV
I found a similar thread on SDN but is not answered.
Thanks,
Jhansi
‎2011 Oct 13 3:53 AM
‎2011 Oct 13 7:35 PM
Madhu - Number range is not a problem as we are able to create orders from VA01 and also the BAPI generates the next unique number but it does not create the actual document.
Thansk for trying to help me. Is there anything else that you think is causing the problem?
Thanks,
Jhansi
‎2011 Oct 14 4:06 AM
Hi,
Can you try as below like, I am not sure but if you can try it may give you reason,
since you are creating multiple orders, assuming that you are calling this BAPI inside the loop.
Now if is it so then after 1st committ work of your BAPI (For 1st SO), immediatly it might be trying to enque table again although it might still be locked with previouse entry (1st SO), so it is generating Number but not able to enque the table so might be throwing this error.
To check this what you can do is,
after BAPI call you might be Calling BAPI_TRANSACTION_Committ or some other committwork FM, now after that write one more statement inside the loop only and immedeately after BAPI_TRANSACTION_COMMITT.. that is WAIT UPTO 2 SECONDS.
So structure of your program will be as below,
loop..............
Call function BAPI_SALESDOCU_CREATEFROMDATA ...........
..............
Call Function BAPI_TRANSACTION_COMMIT
...........
............
WAIT UP TO 2 SECONDS.
Endloop.......If this time you are not getting the error for 2nd SO then it can be concluded that it is table lock error after immediate committ work, please try and let us know so that we can check out some other possible reasons also.
‎2011 Oct 14 4:28 AM
Hi UMANGmehta ,
Thanks for your response. Yes the BAPI is called in the loop. I already have WAIT UP TO 3 Seconds exactly same as suggested by you but still this issue is occurring. Please let me know if there is anything else that I can try.
Thansk,
Jhansi
‎2011 Oct 14 4:54 AM
check WITHOUT_COMMIT parmaeter of the BAPI, have you passed value as X or space.
Also check VBUV entry, whether there is some incompletion log for sales order which is already created or to be created and giving you error.
If above thing not giving you idea then try BAPI BAPI_SALESDOCU_CREATEFROMDATA2, I think it solves the same purpose with very minor changes in your program.
‎2011 Oct 18 3:13 AM
Hi UMANGmehta ,
I am passing 'X' to BAPI_TRANSACTION_COMMIT. I will try BAPI_SALESDOCU_CREATEFROMDATA2 and let you know.
Thanks,
Jhansi
‎2011 Oct 18 3:20 AM
Hi Jhansi,
As i know there is no bapi BAPI_SALESDOCU_CREATEFROMDATA2 ,but there is a BAPI_SALESDOCU_CREATEFROMDATA1.If you want to create sales order why can not you try with BAPI_SALESORDER_CREATEFROMDAT2.
Regards,
Madhu.