在CO11的增强中的ZXCOFU14增加如下代码,本公司使用,其他公司可以借鉴
if ( afrud_imp-lmnga > 0 or afrud_imp-XMNGA > 0 ) and CAUFVD_IMP-STLBEZ+11(1) <> 'P'.
data:zmenge like aufm-menge."上工序发料数量
data:zgmnga like afru-gmnga,"合格数量
zxmnga like afru-xmnga."报废数量
data:tgmnga like afru-gmnga,"反冲合格数量
txmnga like afru-xmnga."反冲报废数量
DATA:SGMNGA LIKE afru-gmnga."反冲合格数量
select sum( menge ) into zmenge from aufm where
aufnr = CAUFVD_IMP-AUFNR and sobkz = 'E' AND BWART = '261'.
select sum( gmnga ) sum( xmnga ) into (zgmnga ,zxmnga ) from afru where
aufnr = CAUFVD_IMP-AUFNR and rueck = AFVGD_IMP-rueck.
select sum( gmnga ) sum( xmnga ) into (tgmnga ,txmnga ) from afru where
aufnr = CAUFVD_IMP-AUFNR and rueck = AFVGD_IMP-rueck and stokz = 'X'.
SGMNGA = ( zgmnga - Tgmnga * 2 ) + ( zxmnga - Txmnga * 2 ) + afrud_imp-lmnga + afrud_imp-XMNGA.
IF SGMNGA > zmenge.
MESSAGE e004(ZNYJ13) WITH '报工总数量' SGMNGA '大于上工序发料数量' zmenge.
EXIT.
ENDIF.
endif.
IF afrud_imp-XMNGA > 0.
SUBMIT zco11 AND RETURN "VIA SELECTION-SCREEN
WITH gv_aufnr = CAUFVD_IMP-AUFNR
with gv_lmnga = afrud_imp-XMNGA
with gv_matnr = CAUFVD_IMP-STLBEZ
with gV_RUECK = AFVGD_IMP-RUECK
WITH GV_RMZHL = AFVGD_IMP-RMZHL.
ENDIF.
阅读(953) | 评论(0) | 转发(0) |