REPORT zmm022.
*----------------------------------------------------------------------*
* 数据字典引用
*----------------------------------------------------------------------*
TABLES:
matdoc,
makt,lfa1,
ekko,
ekpo.
*----------------------------------------------------------------------*
* 类型声明
*----------------------------------------------------------------------*
TYPES:
BEGIN OF ty_result,
ebeln TYPE ebeln,
bukrs TYPE bukrs,
waers TYPE waers,
ekorg TYPE ekorg,
bsart TYPE ekko-bsart,
batxt TYPE t161t-batxt,
ekgrp TYPE ekko-ekgrp,
aedat TYPE ekko-aedat,
lifnr TYPE ekko-lifnr,
name1 TYPE lfa1-name1,
matkl TYPE ekpo-matkl,
ebelp TYPE ekpo-ebelp,
loekz TYPE ekpo-loekz,
pstyp TYPE ekpo-pstyp,
knttp TYPE ekpo-knttp,
matnr TYPE ekpo-matnr,
txz01 TYPE ekpo-txz01,
idnrk TYPE resb-matnr,
maktx TYPE makt-maktx,
enmng TYPE resb-enmng,
erfmg TYPE resb-erfmg,
werks TYPE ekpo-werks,
lgort TYPE ekpo-lgort,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
zhsj TYPE ekpo-netpr,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
netwr TYPE ekpo-netwr,
mwskz TYPE ekpo-mwskz,
text1 TYPE t007s-text1,
frc6 TYPE ekpo-netpr,
lifnr_frc6 TYPE lifnr,
name1_frc6 TYPE name1,
frgke TYPE ekko-frgke,
541 TYPE mseg-menge,
543 TYPE mseg-menge,
101 TYPE mseg-menge,
meins_101 TYPE mseg-meins,
actual_yield_bom TYPE p DECIMALS 2, "订单BOM标准收率
actual_yield TYPE p DECIMALS 2, "实际收货收率
outstanding TYPE ekpo-menge, "未清的采购数量
banfn TYPE ekpo-banfn,
bnfpo TYPE ekpo-bnfpo,
ernam TYPE ekko-ernam,
knumv TYPE ekko-knumv,
kposn TYPE prcd_elements-kposn,
END OF ty_result,
BEGIN OF type_data,
mblnr TYPE matdoc-mblnr,
mjahr TYPE matdoc-mjahr,
charg TYPE matdoc-charg, "批号 & 扣除生料批号
erfmg TYPE matdoc-erfmg, "数量 & 扣除损耗数量
budat TYPE matdoc-budat,
matnr TYPE matdoc-matnr,
maktx TYPE makt-maktx,
ebeln TYPE matdoc-ebeln,
ebelp TYPE matdoc-ebelp,
bsart TYPE ekko-bsart, "采购订单类型
batxt TYPE t161t-batxt, "采购订单类型描述
lifnr TYPE matdoc-lifnr,
cancelled TYPE matdoc-cancelled, "被冲销标志
reversal_movement TYPE matdoc-reversal_movement, "冲销标志
canceldesc TYPE char20, "冲销说明:被冲 与 冲销
name1 TYPE lfa1-name1,
werks TYPE matdoc-werks,
bwart TYPE matdoc-bwart,
matkl TYPE mara-matkl, "物料组
wgbez TYPE t023t-wgbez, "物料组描述
issuelgort TYPE matdoc-lgort, "发料仓库代码
issuelgobe TYPE t001l-lgobe, "发料仓库名称
receiptlgort TYPE matdoc-lgort, "收货仓库代码
receiptlgobe TYPE t001l-lgobe, "收货仓库名称
urzei TYPE matdoc-urzei, "物料凭证中的原始行
finprocharg TYPE matdoc-charg, "入库成品批次
finproerfmg TYPE matdoc-erfmg, "入库数量
END OF type_data,
BEGIN OF ty_detail,
mblnr TYPE mseg-mblnr,
mjahr TYPE mseg-mjahr,
zeile TYPE mseg-zeile,
bwart TYPE mseg-bwart,
btext TYPE t156t-btext,
ebeln TYPE mseg-ebeln,
ebelp TYPE mseg-ebelp,
matnr TYPE mseg-matnr,
maktx TYPE makt-maktx,
charg TYPE mseg-charg,
budat_mkpf TYPE mseg-budat_mkpf,
lifnr TYPE mseg-lifnr,
matkl TYPE mara-matkl,
werks TYPE mseg-werks,
lgort TYPE mseg-lgort,
lgobe TYPE t001l-lgobe,
menge TYPE mseg-menge,
meins TYPE mseg-meins,
usnam_mkpf TYPE mseg-usnam_mkpf,
shkzg TYPE mseg-shkzg,
umsok TYPE mseg-umsok,
cputm_mkpf TYPE mseg-cputm_mkpf,
END OF ty_detail,
BEGIN OF ty_mseg,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
541 </