Skip to Content
0
Former Member
Jun 03, 2008 at 08:15 AM

Transaction must not be saved with errors

716 Views

Hello All,

My requirement is that an order must not be saved if there is an error.I found that the suitable badi for this is ORDER_SAVE and method is CHECK_BEFORE_SAVE .

Inside the method I use the FM CRM_ORDER_READ to get the log handle for the order and then read the error message using the FM's CRM_MESSAGES_DISPLAY (iv_surpress_output = 'X' ) and CRM_MESSAGES_GET_MSG_INFO and raise do_not_save exception . I am able to prevent save when an error exists.

But my doubt is when CRM exchanges data with R/3 after save and there is error thrown back from the R/3 end , will this logic prevent the document save because of the error messages from R/3.

Thanks,

Sriram