Application Development and Automation 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: 
Read only

Commit error in a BADI

Former Member
0 Likes
737

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.

4 REPLIES 4
Read only

uwe_schieferstein
Active Contributor
0 Likes
650

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

Read only

uwe_schieferstein
Active Contributor
0 Likes
650

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

Read only

0 Likes
650

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.

Read only

Former Member
0 Likes
650

Called another program in which I specified the error message.

Thanks

Kumar.