SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

validations - не выводит сообщение типа W



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
naku13
Участник
Участник



Joined: 20 Jul 2009
Posts: 8

PostPosted: Tue Jul 28, 2009 7:47 am    Post subject: validations - не выводит сообщение типа W Reply with quote

Настроена проверка 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 выходит что сообщение должно выводится в любом случае.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 145
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Tue Jul 28, 2009 1:27 pm    Post subject: Reply with quote

Вы посмотрите по стеку вызова, нет ли у вызывающего ФМ в исключениях 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.
Back to top
View user's profile Send private message Blog Visit poster's website
naku13
Участник
Участник



Joined: 20 Jul 2009
Posts: 8

PostPosted: Thu Jul 30, 2009 7:03 am    Post subject: Reply with quote

спасибо!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.