交货单和销售订单增强不能报错误消息导致DUMP问题解决;

时间:2021-08-24 17:03:21

1.销售订单增强  报 E 和 W 类型消息 导致报错 ,后面加上 一句代码:

LEAVE TO TRANSACTION 'VA02' AND SKIP FIRST SCREEN .

 

或者用这种消息方式

MESSAGE ID 'ZSD01' TYPE 'E' NUMBER '187' WITH L_MATNR_STR ZATWRT_NEW LS_ZAPP_MTR_SMZQ-ZYJHFSJ.

 

2.交货单增强报错误消息

 

*eject
*---------------------------------------------------------------------*
*       FORM USEREXIT_SAVE_DOCUMENT_PREPARE                           *
*---------------------------------------------------------------------*
*       This userexit can be used for changes or checks, before a     *
*       document is saved.                                            *
*                                                                     *
*       If field T180-TRTYP contents 'H', the document will be        *
*       created, else it will be changed.                             *
*                                                                     *
*       This form is called at the beginning of form BELEG_SICHERN    *
*                                                                     *
*---------------------------------------------------------------------*
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
*{   INSERT         DEVK900238                                        1
  INCLUDE ZZ_MV50AFZ1_SAVE_DOCUMENT_PRE.

*  INCLUDE ZZ_MV50AFZ1_CREATE_INBOUND.
*}   INSERT

ENDFORM.
*使用这个Perform才能报错误消息
PERFORM MESSAGE_HANDLING(SAPMV50A) USING 0 '241' 'E' 'ZSD01' SPACE SPACE SPACE SPACE.