‎2011 Feb 17 11:10 AM
I need to use this BAPI to create an invoice and a credit memo against the same purchase order in one 'hit'. If the second call to the BAPI fails, I want to rollback both sets of changes. IIt's been fixed in my mind for a while now that this is not possible.; that if you call this BAPI you have to complete the process by committing or rolling back the changes before calling it a second time. However, I've done a bit of testing and doing the commit / rollback after the second call seems to be working fine.
Has anyone else done this sort of thing successfully in Production? I don't want to tell them that it is possible and make them really happy and then find out that I was wrong.
‎2011 Feb 17 3:16 PM
I have a similar scenario with BAPI_ACC_DOCUMENT_POST, where two or even four postings need to be made successfully or none at all. The rollback is actually a very rare case in production, but it was tested quite a bit beforehand with forced errors and always worked as desired.
As you know, it works only as long as the BAPI does not have a commit work inside (they should not if programmed properly).
Thomas
‎2011 Feb 17 3:16 PM
I have a similar scenario with BAPI_ACC_DOCUMENT_POST, where two or even four postings need to be made successfully or none at all. The rollback is actually a very rare case in production, but it was tested quite a bit beforehand with forced errors and always worked as desired.
As you know, it works only as long as the BAPI does not have a commit work inside (they should not if programmed properly).
Thomas
‎2011 Feb 17 3:32 PM
We have used this approach with combination of BAPI's and Z function modules and have had no problem.
‎2011 Feb 18 10:12 AM
Thanks for your reassuring replies. The customer is going to be very, very happy....