I have created functionality for Prepayment Invoice posting, When I post this invoice then I get error in while inserting GL entries but previously my sales invoice hdr & Sales invoice Line inserted so after getting error my GL entries, customer ledger entries not Inserting, So after getting error I want to not insert Sales Inv Hdr & Sales Inv Line data.
Actually I am posting Prepayment through batch, I get Rounding error in CU 12, but after getting error transaction not rolling back(Data inserts in Sales inv hdr & Sales Inv Line).
If the transactions stay in your database after exiting then your commit function works fine. Never use COMMIT, until at the end of your transaction! NEVER.