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

problem with badi WORKORDER_UPDATE

Former Member
0 Likes
1,715

hi all,

i need to put error message at method BEFORE_UPDATE during save for CJ20N , it ends up making the system short dump: ON-COMMIT processing must not be interrupted.

here is my coding:

method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE .

INCLUDE mm_messages_mac.

data: w_comp like line of iT_COMPONENT.

loop at it_component into w_comp where matnr = '000000000060002322'.

mmpur_message_forced 'E' 'ZZ' '055' 'test' 'ester' '' ''.

endloop.

endmethod.

is there any way i can trigger the error without making the system short dump? i hv tried in method IN_UPDATE, another warning inbox occurs, please advice

1 REPLY 1
Read only

Former Member
0 Likes
749

Hi Ester,

Please check the BADI documentation which says :

"Note that no system messages may be sent in the methods. The only exception is the AT_SAVE method. Within this method, a system message may be issued, but only if you trigger the exception ERROR_WITH_MESSAGE at the same time."

So reading this , I feel that you need to code in the AT_SAVE method to display the error messages.

Cheers,

Disha