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

Error_with_message is not working inside IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE

former_member357236
Participant
0 Kudos
1,823

Hi,

Error_with_message is not working inside IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE.

Kindly suggest.

Regards,

Gopi

1 ACCEPTED SOLUTION
Read only

karthikeyan_p3
Contributor
0 Kudos
749

Hi Gopi,

How are you raising the exception ERROR_WITH_MESSAGE in the method change_at_save.

The exception has to be raised using Message statement.

message xxx raising ERROR_WITH_MESSAGE

Please find the method documentation


ERROR_WITH_MESSAGE should be triggered if you want to prohibit creation of a logistics invoice document or changing of or deleting a parked document.

Note that this exception should only be triggered in conjunction with a system message (message xxx raising ERROR_WITH_MESSAGE).

Thanks,

Karthikeyan

3 REPLIES 3
Read only

karthikeyan_p3
Contributor
0 Kudos
750

Hi Gopi,

How are you raising the exception ERROR_WITH_MESSAGE in the method change_at_save.

The exception has to be raised using Message statement.

message xxx raising ERROR_WITH_MESSAGE

Please find the method documentation


ERROR_WITH_MESSAGE should be triggered if you want to prohibit creation of a logistics invoice document or changing of or deleting a parked document.

Note that this exception should only be triggered in conjunction with a system message (message xxx raising ERROR_WITH_MESSAGE).

Thanks,

Karthikeyan

Read only

0 Kudos
749

Hi Karthik,

Thanks,

I have already tried with MESSAGE I006(ZMM) RAISING ERROR_WITH_MESSAGE.

This is triggering but i'm not getting message.

Read only

0 Kudos
749

Hi Gopi,

You can only stop the processing of the Invoice in that BADI.

Try with

MESSAGE E006(ZMM) RAISING ERROR_WITH_MESSAGE


Thanks,

Karthikeyan