Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MB_DOCUMENT_BADI and bapis/commit work

Hi all,

I need to book an invoice while executing MIGO. I use the class MB_DOCUMENT_BADI and the method MB_DOCUMENT_UPDATE, where I call BAPI_INCOMINGINVOICE_CREATE. Unfortunately it does not work (it exits debugger), as it seems that the material document has not been created yet ( but inside the badi I have already MBLNR...) . I tried to use BAPI_TRANSACTION_COMMIT before creating invoice, but it also exits. Can use those BAPIs inside MB_DOCUMENT_UPDATE?

Thanks!

Anna

Former Member
Former Member replied

Hi,

when calling the BAPI call it in background task..

CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'

IN BACKGROUND TASK

...............

Thanks

Naren

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question