SAP的 消息 弹出窗口(备忘)

DATA: i_smesg TYPE tsmesg WITH HEADER LINE.


   i_smesg-msgty = 'E'.
   i_smesg-arbgb = '00'.
   i_smesg-txtnr = '001'.
   i_smesg-msgv1 = 'test1'.
   i_smesg-msgv2 = '箱码未扫描装车'.
   i_smesg-msgv3 = ''.
   APPEND i_smesg.

 IF i_smesg[] IS NOT INITIAL.
   CLEAR i_smesg.
   i_smesg-msgty = 'E'.
   i_smesg-arbgb = '00'.
   i_smesg-txtnr = '001'.
   i_smesg-msgv1 = '下列箱码未扫描装车'.
   INSERT i_smesg INDEX 1.

   CALL FUNCTION 'FB_MESSAGES_DISPLAY_POPUP'
     EXPORTING
       it_smesg        = i_smesg[]
     EXCEPTIONS
       no_messages     = 1
       popup_cancelled = 2
       OTHERS          = 3.
   IF sy-subrc <> 0.
     RETURN.
   ENDIF.
 ENDIF.

 

posted @ 2019-09-10 09:58  真的是很难  阅读(768)  评论(0编辑  收藏  举报