*&---------------------------------------------------------------------*
*& Report ZMMF002
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zmmf007a.
INCLUDE ZMMF007A_TOP.
INCLUDE ZMMF007A_SCR.
INCLUDE ZMMF007A_FRM.
*4900001808
START-OF-SELECTION .
PERFORM frm_get_data.
PERFORM frm_process_data.
PERFORM frm_display_alv .
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& 包含 ZMMF002_TOP
*&---------------------------------------------------------------------*
TABLES : rkpf ,resb ,mkpf ,mseg .
DATA: BEGIN OF gs_out ,
bwart LIKE mseg-bwart , " 移动类型
mblnr LIKE mseg-mblnr,
zeile LIKE mseg-zeile,
budat LIKE mkpf-budat , "日期
matnr LIKE resb-matnr , "物料编码
maktx TYPE makt-maktx , " 物料描述
meins LIKE resb-meins , " 单位
menge LIKE mseg-menge , "需求数量
werks LIKE mseg-werks,
lgort LIKE resb-lgort , "调出仓库代码
lgobe LIKE t001l-lgobe , "调出仓库名称
werks2 LIKE mseg-werks,
lgort2 LIKE mseg-lgort , "调入仓库代码
lgobe2 LIKE t001l-lgobe , "调入仓库名称
name1 LIKE t001w-name1, "调出工厂名称
name2 LIKE t001w-name1 , "调出工厂名称
mark ,
remark TYPE c LENGTH 50,
ebeln LIKE mseg-ebeln,
ebelp LIKE mseg-ebelp,
zprt_cnt LIKE zmmt001q-zprt_cnt , " 打印次数
END OF gs_out .
DATA: gt_out LIKE TABLE OF gs_out .
DATA: BEGIN OF gs_rkpf ,
bwart LIKE rkpf-bwart , " 移动类型
" 移动类型文本
" 领料部门
rsnum LIKE rkpf-rsnum , "预留单号
END OF gs_rkpf .
DATA: gt_rkpf LIKE TABLE OF gs_rkpf .
DATA: BEGIN OF gs_resb ,
bwart LIKE resb-bwart , "移动类型
rsnum LIKE resb-rsnum , "预留单号
rspos LIKE resb-rspos , "项号
bdter LIKE resb-bdter , "日期
matnr LIKE resb-matnr , "物料编码
charg LIKE resb-charg , "评估类别
meins LIKE resb-meins , " 单位
bdmng LIKE resb-bdmng , "需求数量
lgort LIKE resb-lgort , "调出仓库代码
umlgo LIKE resb-umlgo , "调入仓库代码
sgtxt LIKE resb-sgtxt , "项目文本
END OF gs_resb .
DATA: gt_resb LIKE TABLE OF gs_resb .
DATA: BEGIN OF gs_makt ,
matnr LIKE makt-matnr,
maktx LIKE makt-maktx,
END OF gs_makt .
DATA: gt_makt LIKE TABLE OF gs_makt .
DATA: BEGIN OF gs_marc ,
werks LIKE marc-werks,
matnr LIKE marc-matnr,
lgpro LIKE marc-lgpro , " 生产仓储地点
lgfsb LIKE marc-lgfsb , " 采购仓储地点
END OF gs_marc .
DATA: gt_marc LIKE TABLE OF gs_marc .
DATA: BEGIN OF gs_t001l ,
werks LIKE t001l-werks,
lgort LIKE t001l-lgort , "仓库代码
lgobe LIKE t001l-lgobe , "仓库名称
END OF gs_t001l .
DATA: gt_t001l LIKE TABLE OF gs_t001l.
DATA: BEGIN OF gs_t001w,
werks LIKE t001w-werks,
name1 LIKE t001w-name1,
END OF gs_t001w.
DATA: gt_t001w LIKE TABLE OF gs_t001w.
DATA: BEGIN OF gs_stxl,
tdobject LIKE stxl-tdobject , " 文本对象 EKPO
tdname LIKE stxl-tdname, "文本名 编号加5位序号 430000000500010
tdid LIKE stxl-tdid,
clustd LIKE stxl-clustd , "项目文本数据
END OF gs_stxl .
DATA: BEGIN OF gs_mseg ,
bwart LIKE mseg-bwart, "移动类型
mblnr LIKE mseg-mblnr, " 凭证号
budat LIKE mkpf-budat, "日期
ebeln LIKE mseg-ebeln, "采购订单号
ebelp LIKE mseg-ebelp, "采购订单行项目
zeile LIKE mseg-zeile , "行项目
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
shkzg LIKE mseg-shkzg, "借贷项
line_id LIKE mseg-line_id,
parent_id LIKE mseg-parent_id,
END OF gs_mseg .
DATA: gt_mseg LIKE TABLE OF gs_mseg .
DATA: BEGIN OF gs_mbmps,
smbln LIKE m_mbmps-smbln,