Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

MB_DOCUMENT_BADI can not show error message URGENT

Former Member
0 Kudos

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.

3 REPLIES 3

h_senden2
Active Contributor
0 Kudos

Hi,

have you solved this problem ?

Because i have something familiar to solve. How did you solve it ?

regards,

Hans

Former Member
0 Kudos

Hi all,

Try using the BADI "MB_MIGO_BADI" it has an POST_DOCUMENT where you can do the validations.

Reward if helpful plz.

Fran

0 Kudos

HI:

We can turn around to other enhancement in 'CMOD'.