作者:​sap侠之大者​


Today user submits a issue to our support team. There is ABAP Dump when save the delete operation to one SO, but other operation of SO can be saved correctly. The keywords as follows:   



"DYNPRO_MSG_IN_HELP" " "



"SAPMV45A" or "MV45AFZZ"



"USEREXIT_SAVE_DOCUMENT_PREPARE"



The program attempted to issue a " " message during "Exit Command" processing.





we find more than one thousands code in user-exit USEREXIT_SAVE_DOCUMENT_PREPARE, and there are several statement like MESSAGE ......TYPE 'E' . So, maybe it caused by these message type ERROR. But user says the Message display function works well for more than one year, and we are confused, why raise a dump ?



after debug the standard program of VA02, we find it will call a AT EXIT-COMMAND PAI module when save the delete operation.and in this module it will call USEREXIT_SAVE_DOCUMENT_PREPARE and trigger a Message type E , this is the point. it is forbidden to display an ERROR message in AT EXIT-COMMAND module, otherwise it will raise a dump like 'DYNPRO_MSG_IN_HELP The program attempted to issue a " " message during "Exit Command" processing.'



according to this analysis, we try to move the code related to user-exit USEREXIT_CHECK_VBAP, and it works.



as we know, it must not to display message type E in USEREXIT_SAVE_DOCUMENT , also, we have these remark:



1It is not recommended display message type E in USEREXIT_SAVE_DOCUMENT_PREPARE, the best location is routines for check, like USEREXIT_CHECK_VBAP, USEREXIT_CHECK_VBAK etc..



2we should test scenario as many as possible, exitt/enhancement especially