Posted: Tue Jul 28, 2009 7:47 am Post subject: validations - не выводит сообщение типа W
Настроена проверка FI на строку документа(validations, ggb0). Сообщение типа W. Проверка срабатывает (проверено отладчиком), но сообщение не выводится. Если сделать тип E - сообщение выводится.
В коде идет ветвление по типу сообщения:
Code:
CASE valsevere.
WHEN 'A'.
MESSAGE ID msg_id TYPE valsevere NUMBER msg_nr
WITH msgv1 msgv2 msgv3 msgv4
RAISING abend_message.
WHEN 'E'.
MESSAGE ID msg_id TYPE valsevere NUMBER msg_nr
WITH msgv1 msgv2 msgv3 msgv4
RAISING errormessage.
WHEN OTHERS.
MESSAGE ID msg_id TYPE valsevere NUMBER msg_nr
WITH msgv1 msgv2 msgv3 msgv4.
Выполняется message...raising для типа E и message для типа W.
В то же время, из справки по message выходит что сообщение должно выводится в любом случае.
Age: 175 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Tue Jul 28, 2009 1:27 pm Post subject:
Вы посмотрите по стеку вызова, нет ли у вызывающего ФМ в исключениях error_message
Code:
CALL FUNCTION 'xxxxx'
......
EXCEPTIONS
error_message = 1. " This will catch the error message.
и далее из хелпа
Quote:
If the error_message addition is specified after EXCEPTIONS, all MESSAGE statements that are executed during the processing of the function module and do not have the RAISING addition are affected as follows:
Messages of the type S, I, or W are not sent but are noted in the log background processing.
Messages of the type E and A trigger the exception error_message and set sy-subrc to n_error. The message class, message type, message number, and the contents of possible placeholders for the MESSAGE statement are in the fields sy-msgid, sy-msgno, sy-msgty, and sy-msgv1, ... , sy-msgv4.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.