‎2008 May 28 8:08 PM
Hi Everyone,
I am using Workorder_update BADI. The code i am writing is
if wa_afvgb-ltxa1 NE wa_aafvc-ltxa1.
MESSAGE e000(ZAN) with text-001.
else.
message e000(ZAN) with text-002.
endif.The problem is when I run IW32 trasaction and when I was suppossed to get this error, I am getting an error. It works fine till then, but then it gives me a dump saying "COMMIT work should not be interrupted". Can anyone please help me out here. I want the error to happen, but do not want the dump.
Thanks.
Kumar.
‎2008 May 28 8:50 PM
Hello Kumar
You MUST NOT raise any AEX message within BAdI methods.
Either the methods have exception classes defined in their interface or they may have parameters that indicate an error in the method (e.g. CHANGING parameter CH_FAILED in one of the methods of BAdI ME_PROCESS_REQ_CUST).
Regards
Uwe
‎2008 May 28 8:50 PM
Hello Kumar
You MUST NOT raise any AEX message within BAdI methods.
Either the methods have exception classes defined in their interface or they may have parameters that indicate an error in the method (e.g. CHANGING parameter CH_FAILED in one of the methods of BAdI ME_PROCESS_REQ_CUST).
Regards
Uwe
‎2008 May 29 2:02 PM
Uwe,
Yes, you are right. I have noticed that in the documentation now. But the problem is in BADI "WORKORDER_UPDATE", I am using instance "BEFORE_UPDATE" as it has got all the data which I need. But it does not have any exceptions. There is an exception in instance "AT_SAVE" but it is being called before the instance which I am using. I need to give an error message from this BADI. Can you please help me out.
Thanks
Kumar.
‎2008 May 29 8:42 PM
Called another program in which I specified the error message.
Thanks
Kumar.