SAP MIGO凭证保存时增强 -- 保存102冲销收货到非限制或者产生待检批到中间表
实现
- BADI:MB_MIGO_BADI
- 方法:IF_EX_MB_MIGO_BADI~POST_DOCUMENT
data: WA_MSEG type MSEG. data: LS_ZTWMS_T004 type ZTWMS_T004, LT_ZTWMS_T004 type table of ZTWMS_T004. "采购订单 收货 loop at IT_MSEG into WA_MSEG where BWART = '102' and EBELN is not initial. clear: LS_ZTWMS_T004. select single * from ZTWMS_T004 as a where MBLNR = @WA_MSEG-LFBNR and MJAHR = @WA_MSEG-SJAHR and ZEILE = @WA_MSEG-LFPOS and EBELN = @WA_MSEG-EBELN and EBELP = @WA_MSEG-EBELP into @LS_ZTWMS_T004. if LS_ZTWMS_T004 is not initial. LS_ZTWMS_T004-ZSTATUS = '4'. "此条记录被删除 LS_ZTWMS_T004-ZFLAG = 'X'. append LS_ZTWMS_T004 to LT_ZTWMS_T004. endif. endloop. if LT_ZTWMS_T004 is not initial. modify ZTWMS_T004 from table LT_ZTWMS_T004. endif.
post SAP-Garson
原文链接:https://blog.csdn.net/qq_30797051/article/details/121974074文章来自于网络,如果侵犯了您的权益,请联系站长删除!