Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ACC_DOCUMENT_POST cannot be rolling back

Former Member
0 Kudos
626

Hi all,

Apparently, when I do G/L posting with BAPI_ACC_DOCUMENT_POST, everything was smooth and FI document created. Due to the requirement, user will have a test mode (test run), where if run in test mode, BAPI_TRANSACTION_ROLLBACK is called, else, BAPI_TRANSACTION_COMMIT shall be triggered.

I am having no issue with BAPI_TRANSACTION_COMMIT, but BAPI_TRANSACTION_ROLLBACK. My FI document number, bkpf-belnr keeps on increase though rollback is called. I even using FREE MEMEORYstatement, but having no luck as well.

Do you guys have any idea on this?

Thanks and regards,

Patrick

(P/S: Points will be rewarded for useful answers)

3 REPLIES 3

Former Member
0 Kudos
121

Just don't call BAPI_TRANSACTION_COMMIT in a test run. You won't have to do a rollback either.

But the document number will increment in either case.

Rob

0 Kudos
121

Hi Rob,

Thanks for your reply. I have figured out on how to solve my puzzles. I will have to use BAPI_ACC_DOCUMENT_CHECK before hand. It's good to apply that BAPI in Test Mode though.

Thanks and regards,

Patrick

Former Member
0 Kudos
121

Issue solved.