I am working with a classic Badi within a transaction where I wanted to commit some information to a database before the commit that occurs at the end of the transaction.
Putting a commit point directly inside the BADI caused problems with cursors that were open inside the transaction, so I researched some and discovered that Report Programs can run in a separate database Logical Unit of Work (LUW).
I coded my BADI to call a report which does some database work based on input parameters, and then commits this work to the database before returning control back to the calling BADI function.
Does anyone know of any potential problems from doing this? It seems like a good way to get around restrictions on the use of commit points inside transactions, but I'm not sure if there could be potential undesired effects from doing this.
Has anyone tried this before?