Skip to Content

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

MB_DOCUMENT_BADI can not show error message URGENT

hi all:

now i have a badi problem.

I use t-code migo to post a purchase oder to complete goods receipt.

I need to control the stock when user click the 'post' button, then maybe I WILL give a error message and then stop the migo program.

for example, i wirte the code 'show message e398(00) with 'error message'' in the badi implementation ZMB_DOCUMENT_BADI,method 'MB_DOCUMENT_BEFORE_UPDATE' and active it. it will come to a runtime error 'MESSAGE_TYPE_X'.

I debug the programe I found when the progamm come to

'show message e398(00) with 'error message'' ,next it will return sy-subrc = 4.

if I MODIFY the e398(00) with i398(00) then it will be OK

but I can not stop the program migo.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question