We have created a tool in Ariba which takes the PO numbers from the csv file and automatically closes them in SAP. This closure is being done by sending a message through callAsnyc function of callcenter class.
But we are stuck with a problem. When we run this task for large number of records say 150+ all the records are processed and closed successfully but instead of getting a completed message in the UI we get the Error and in the logs we get this exception.
Request you all to please let us know if anyone of you have ever experienced any such problem and looking for pointers. Please let me know in case if any other information is required in this regard.
An out of date exception usually indicates and attempt to update an object which has been committed to the database by a separate process...hence the "Out of Date exception. A common error might be committing the transaciton to early, so make sure you are not inadvertantly doing that. With a series of triggers and an external system involved, it can get more complicated because one of the earlier triggers in the sequence may have already committed the object resulting in your reference to the object being out of date. I think you probably need ot figure out the different processes which are updating the object and you will probably find a conflict somewhere.
Thanks for your suggestion. I tweaked the code a little bit, and changed the positioning of the base.getSession.transactionBegin() and base.getSession.transactionCommit() statements. although I'm still getting plenty of warning messages regarding the same Requisition object being accessed/updated more than once, I have not encountered the exception so far, in the 5-6 runs we did, each with number of records ranging from 150-220.