在badi中按照正常的message x…

转自:(http://blog.csdn.net/liangziyisheng/article/details/7423533

在badi中按照正常的message xxx的方式无法把message抛出来,

CALLPOPUP_TO_CONFIRM去解决这个问题,完了测试一看,像那么回事。

且看代码:

METHOD if_ex_invoice_update~change_at_save.

  DATA: lv_answer TYPE c.
  DATA: lv_text(300) TYPE c.

  CONCATENATE text-002 text-003 text-004 INTO lv_text.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
        titlebar              text-001 Error
        text_question         lv_text " Message text
        text_button_1         text-005 " Ingore
        text_button_2         text-006 " Handle Error
        display_cancel_button ''          " disable this button
        popup_type            'ICON_MESSAGE_ERROR' " error message icon
      IMPORTING
        answer                lv_answer.     " button number
    IF lv_answer 2.
      LEAVE TO SCREEN 6000.              " return to current screen
    ENDIF.
ENDMETHOD
.

posted @ 2014-01-22 09:18  胡来  阅读(96)  评论(0编辑  收藏  举报