Hi nico.dewaele ,From the code you shared I see that you're trying to substitute the business area in SD invoices which is totally fine.However I'd use the user exits in SD before the items are transferred to FI. Kindly check the TCode : SMOD and th...
Additionally I'd recommend you to check from which TCode the postings are coming from. It can also be clearing or a wrong posting that is triggered by a BAPI. But most probably ajit.kumar13 is correct.
Hello,I think the blog posts below are quite goodUsing BadI:https://blogs.sap.com/2018/03/27/enlarging-the-use-of-bapi_acc_document_post/Using business transaction event RWBAPI01:https://blogs.sap.com/2019/05/10/role-of-bte-process-rwbapi01-in-bapi_...
I am not an ABAPer but the method I'd prefer is to create an infinite loop and then go to SM50 to find the process and try to debug from there. I generally insert the code piece like below right above the code I want to debug.
DATA : lv_var1 TYPE c ...