转自:(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 =