在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.
欢迎关注订阅号:SAP学习记录 (SAPlearning )
  
 
  
                










