I've implemented P/S BTE 1030. The requirement is to post a follow on accounting document immediately after the original accounting document is posted. Inside the BTE I've an RFC-enabled wrapper FM(called in background task destination none) which calls the account posting BAPI followed by commit work. Is this the correct/recommended approach for achieving this requirement? More importantly, is it ok to use an explicit commit work inside the background LUW?
The statements COMMIT WORK and ROLLBACK WORK must not be executed within a LUW. In addition, no implicit database commit can be triggered there.