‎2008 Aug 08 11:07 AM
Hello All,
I am creating multiple Purchase orders in one go from mulitple Purchase requisitions.
For every single PR, one PO gets created.
When i try to convert 10 PR's to 10 PO' s through bapi bapi_po_create1, only 5 or 6 PO's are getting created.
For those PR's where PO not getting created, i get a generic error. Next time i run those faulty PR's, PO's are getting created. There is no issue in coding as all PR's are getting converted to PO's but not at one go.
It looks to me that this is memory problem.
Any one face the same situation earlier.
Any pointers in this direction will be helpful.Awaiting reply at the earliest.
Best Regards,
Tarun
‎2008 Aug 08 11:29 AM
Hi Tarun,
Better approach would be to loop at each PR and create PO, use COMMIT WORK after each PO creation and then proceed to next one.
I am not sure , but it might be possible that some data (material data etc) might be locked by one PO while other is trying to access it and hence error occurs.
Regards,
Mohaiyuddin
‎2008 Aug 08 11:44 AM
You need to pass one by one PR to the FM. After each FM Execution use COMMIT WORK. Some times this kind of problem created because of service patches. So plz you follow one by one process.
rgds
rajesh
Edited by: RAJESH KUMAR on Aug 8, 2008 4:15 PM
‎2008 Aug 08 1:34 PM
And make sure you clear all of your tables and structures after each call to the BAPI so that you aren't carrying data over from one call to the next.