Skip to Content
-1
Mar 13, 2018 at 07:50 PM

How to pass error messages from User exit to BAPI Return parameter?

1696 Views Last edit Mar 13, 2018 at 08:30 PM 2 rev

Dear experts,

I have implementend an User exit: MM08R002 for validating the Invoice quantity with PO quantity (while creating invoice through MIRO) - for 107/108/122 movement types.

This is working fine while doing invoice manually (MIRO), I am able to fill the error log box using some FM.

But same invocie can also be posted using BAPI: BAPI_INCOMINGINVOICE_CREATE. But while posting invoice through BAPI the RETURN[] parameter is being initial and Invoice is getting generated.

Can anyone help me in filling the BAPI Return parameters with an error message from User exit (component: EXIT_SAPLMR1M_001).

This can be achieved my writing "MESSAGE ENNN(MSG_CLASS)" but for this T-code validation to done so, looking for anyother way like through FM or something else to achieve this.

Thanks & Regards,

Vijay