2007 Apr 16 10:59 AM
Hi,
I am using MB_DOCUMENT_BADI to do some checking of the material document before saving.
How do I stop the transaction from saving if there is an error? I have tried using an error message, but it short dumps.
Thanks
Lindy
Hi,
I am using MB_DOCUMENT_BADI to do some checking of the material document before saving.
How do I stop the transaction from saving if there is an error? I have tried using an error message, but it short dumps.
Thanks
Lindy
2007 Apr 16 11:04 AM
Hi Lindy,
Plz provide the break point where the badi is executing then we can understand the clearly. If u want stop the transaction we should know where to stop. For that also u should put break point.
Rewards points for helpful answer.
Rgds,
P.Nag
2007 Apr 16 11:06 AM
check it has any parameters for posting the error log.
parametes like CT_LOG like this .
Regards
Prabhu
2007 Apr 16 11:07 AM
Hi,
The badi u r using will not allow any kind of messages ...if u use any message it will go for a dump.
u can choose the other badi
MB_CHECK_LINE_BADI
MB_CHECK_LINE_BADI
Better go for MB_CHECK_LINE_BADI ....even i faced the same problem then i went with the implementatio of the above then there are nomore dumps.
hope it will help u
regads
2007 Apr 16 11:10 AM
Hi,
The MB_DOCUMENT_BADI does not pass any data back to the material document, but only helps save additional data (maybe in Z tables) when the Mat. Document is saved. It sounds like you may have the wrong BADI?
Guess this is not particularly useful, but looks like you may have to look for another BADI for this task. I will update the thread if I come across something.
Sudha
2007 Apr 16 11:21 AM
Thanks for replying everyone.
Here is the problem in more detail.
During goods issue and goods receipt, we are capturing data into z tables. A previous abaper has done this using MB_DOCUMENT_BADI method MB_DOCUMENT_BEFORE_UPDATE.
The business has now realised that movement type 301 (stock transfer from plant to plant) is not being captured, which is where I come in. I need to add code to the badi to check this. Transaction is MB1B.
If a certain criteria is not satisfied, I need to stop this 301 movement type from saving and give an error message.
Is this possible from within MB_DOCUMENT_BADI?
Thanks
Lindy
2007 Apr 17 5:37 AM
I'm in ECC6, I created a BADI implementation using MB_DOCUMENT_BADI and used transaction MB1B movement type 301. I put breakpoint on the method MB_DOCUMENT_BEFORE_UPDATE, activated it and also put session break-points at BADI call points in the main SAP program SAPMM07M. When I save the transfer posting, the program doesn't break for me! Has something changed in ECC6? What version are you in Lindy?
Thanks.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |