用途:对指定的MRP Controller的物料,在反冲时,不应用报废率,而只使用标准的数量去反冲消耗。
Class :ZCL_IM_CL_PP_CONF_GMVT
Methoed IF_EX_WORKORDER_GOODSMVT~BACKFLUSH
Class :ZCL_IM_CL_PP_CONF_GMVT
Methoed IF_EX_WORKORDER_GOODSMVT~BACKFLUSH
code:
method IF_EX_WORKORDER_GOODSMVT~BACKFLUSH.data:zMSEG type IMSEG,
zausch type p DECIMALS 4,
zdispo type dispo.
TYPES:
BEGIN OF LTY_STPO,
AUSCH TYPE STPO-AUSCH,
DATUV TYPE STPO-DATUV,
END OF LTY_STPO.
DATA:
LT_STPO TYPE STANDARD TABLE OF LTY_STPO,
LS_STPO TYPE LTY_STPO.
* call :1244666 disable the scrap rate for confiramtion for plant 8900
"I_ORDER_HEADER-stlnr.AUSCH scrap
if I_ORDER_HEADER-WERKS = '8900'.
loop at CT_COMPONENTS into zmseg.
SELECT SINGLE dispo into zdispo from marc where matnr = zmseg-MATNR and dispo in ('713','714','715','T04','T06','T08','T11','T22').
if zdispo is NOT INITIAL.
SELECT SINGLE AUSCH INTO zausch FROM RESB WHERE RSNUM = zmseg-RSNUM AND MATNR = zmseg-MATNR.
zausch = 1 + zausch / 100.
zmseg-erfmg = zmseg-erfmg / zausch .
clear:zausch.
MODIFY CT_COMPONENTS from zmseg TRANSPORTING erfmg.
endif.
clear:zdispo.
endloop.
endif.
endmethod.