-
- 程序说明
物料凭证行项目和保存时的相关控制
程序实现
(1) 已做发票校验的订单收货凭证不允许被冲销
在BADI: ZMB_CHECK_LINE_BADI方法CHECK_LINE中实现增强:
"已做发票校验的订单收货凭证不允许被冲销
IF IS_MSEG-BWART = '102' AND IS_MSEG-EBELN NE '' AND IS_MSEG-SMBLN NE ''.
CLEAR L_DMBTR.
SELECT *
INTO TABLE LT_EKBE
FROM EKBE
WHERE EBELN = IS_MSEG-EBELN
AND EBELP = IS_MSEG-EBELP
AND LFBNR = IS_MSEG-SMBLN
AND LFGJA = IS_MSEG-SJAHR
AND LFPOS = IS_MSEG-SMBLP
AND BEWTP IN ('Q','T').
LOOP AT LT_EKBE INTO LS_EKBE.
IF LS_EKBE-SHKZG = 'S'.
L_DMBTR = L_DMBTR + LS_EKBE-DMBTR.