在ME21N增强中,可以使用message的方法提示错误的消息,但警告消息使用message则提示不了,需要使用系统宏mmpur_message 提示。
data:begin of lw_equp,
lifnr like equp-lifnr,
quote like equp-quote,
qumng like equp-qumng,
end of lw_equp.
data:lt_equp like lw_equp occurs 0.
loop at tekpo.
clear lt_equp.
select equp~lifnr equp~quote equp~qumng into table lt_equp "取配额
from equp
join equk on equk~qunum = equp~qunum
where equk~matnr = tekpo-matnr
and equk~werks = tekpo-werks
and equk~bdatu >= sy-datum
and equk~vdatu <= sy-datum
and equp~quote ne 0.
loop at lt_equp into lw_equp.
mmpur_message 'W' 'ZAJB01' '008' tekpo-ebelp tekpo-matnr lw_equp-lifnr lw_equp-quote.
endloop.
endloop.