Executing a custom function module during MIRO invoice posting

Need help with MIRO invoice posting automation

I’m working on a project where I need to run a custom function module whenever an invoice is posted in MIRO or FB60. I’ve been struggling to find the right approach.

I tried using the trace function to capture events, but I couldn’t find any default function modules being created. This has left me stuck, unable to get the necessary event details.

Has anyone successfully implemented something similar? I’d really appreciate any tips or guidance on how to set up this automation. Maybe there’s a specific user exit or BADI I should be looking at?

Thanks in advance for any help you can provide!

hey there, i’ve dealt with similar stuff. have you looked into badi MM_DOCUMENT_BADI? it’s got hooks for invoice posting. you could implement ur custom logic there. also, check transaction SE18 for other relevant BADIs. good luck with ur project!