MD04 增加自定义列
一列 = '生产工单/采购订单'.
一列 = '销售订单'.
CMOD增强
61X0002 User Exit PP-MRP 物料需求计划估价
EXIT_SAPLM61R_001 ZXM61U03
EXIT_SAPMM61R_001 zxm61u04
zxm61u04 "定义列的名字
*&---------------------------------------------------------------------*
*& 包括 ZXM61U04
*&---------------------------------------------------------------------*
button1_ez = '生产工单/采购订单'.
button2_ez = '销售订单'.
zxm61u03 "溯源生产工单/采购订单和销售订单。
*&---------------------------------------------------------------------*
*& INCLUDE ZXM61U03
*&---------------------------------------------------------------------*
tables:kdst.
data: zpopr(17) type n.
data:vbeln like vbap-vbeln , posnr like vbap-posnr.
if not ibutt1 is initial or not ibutt2 is initial.
vbeln = ''.
posnr = ''.
if imdezexit-delkz = 'AR'.
write ie3mdpslx-del12 to emdezx_usex1 no-zero .
condense emdezx_usex1.
select single kdauf kdpos
into (vbeln , posnr)
from afpo
where aufnr = ie3mdpslx-del12 .
if vbeln is not initial.
concatenate vbeln '/' posnr into emdezx_usex2 .
else.
emdezx_usex2 = ''.
endif.
condense emdezx_usex2.
endif.
if imdezexit-delkz = 'BB'.
concatenate ie3mdpslx-aufvr '-' ie3mdpslx-posvr+3(3) into zpopr.
write zpopr to emdezx_usex1 no-zero .
select single vbeln vbelp
into (vbeln , posnr)
from ekkn
where ebeln = ie3mdpslx-aufvr and ebelp = ie3mdpslx-posvr.
if vbeln is not initial.
concatenate vbeln '/' posnr into emdezx_usex2 .
else.
emdezx_usex2 = ''.
endif.
condense emdezx_usex2.
endif.
endif.