1 . 业务需求
发票预制时金额不能为零
2 . 解决方案
发票预制BADI增强:INVOICE_UPDATE
SE18:INVOICE_UPDATE,实施->显示,打开ZINVOICE_UPDATE,在界面页CHANGE_BEFORE_UPDATE里面的程序
代码示例:
method IF_EX_INVOICE_UPDATE~CHANGE_BEFORE_UPDATE.
* 发票预制的增强
IF sy-tcode = 'MR11' or sy-tcode = 'MR11SHOW'.
return.
ENDIF.
IF S_RBKP_NEW-RMWWR = 0.
message '金额不能为零!' type 'E'.
exit.
ENDIF.
endmethod.