Skip to Content
0
Former Member
Jul 27, 2010 at 09:03 AM

Commit work and wait after bapi execution not working

606 Views

Hi experts,

I have a requirement from my client that consists on posting 2 documents and then clearing them.

Right now Iu2019m posting the first 2 documents using BAPI_ACC_DOCUMENT_POST and for clearing both documents Iu2019m using Tcode F-51 but sometimes it's giving me an error clearing the documents because after the second bapi run, posting the second document, apparently all went right and a document number it's returned but the database doesnu2019t updated the doc number.

Iu2019m using commit work and wait, and already tried BAPI_TRANSACTION_COMMIT, but it doesnu2019t work sometimes, and the only solution that i found was the Wait up 1 second command , which it's slowing the program execution.

i think the problem it's on the bapi posting execution, due to a lag on the database side, but Iu2019m not sure...

Did anyone already had this problem? Has anyone has a solution for this?

Thanks in advance

Best Regards

João Martins