*&---------------------------------------------------------------------*
*& Report Z_SD_CKD
*&
*&---------------------------------------------------------------------*
*&产品出库单
*&
*&---------------------------------------------------------------------*
REPORT ZSDF002.
INCLUDE ZSDF002_INC.
*INCLUDE Z_SD_CKD_INC.
TYPE-POOLS: slis.
TABLES:LIKP, KNA1, LIPS ,MKPF ,MSEG.
TYPES: BEGIN OF TY_ALL,
VBELV LIKE VBFA-VBELV , "销售订单号
VBELN_IM LIKE MSEG-VBELN_IM ,"交货单号
NAME1 LIKE KNA1-NAME1 ,"客户
KUNNR LIKE MSEG-KUNNR ,"送达方
STRAS LIKE KNA1-STRAS ,"客户地址
BUDAT_MKPF LIKE MSEG-BUDAT_MKPF ,"出库时间
TELFX LIKE KNA1-TELFX ,"电话
USNAM_MKPF LIKE MSEG-USNAM_MKPF ,"经办人
MATNR LIKE MSEG-MATNR ,"物料编码
ARKTX LIKE LIPS-ARKTX ,"物料描述
LGORT LIKE MSEG-LGORT ,"库存地点
MENGE LIKE MSEG-MENGE ,"数量
VRKME LIKE LIPS-VRKME ,"单位
CHARG LIKE MSEG-CHARG ,"批次
VBELP_IM LIKE MSEG-VBELP_IM ,"项目
BOLNR LIKE LIKP-BOLNR ,"物流单号
BRGEW LIKE LIPS-BRGEW,"单项目毛重
BEIZHU(20) TYPE C ,"备注
END OF TY_ALL.
TYPES:BEGIN OF TY_HEADER,
VBELV LIKE VBFA-VBELV , "销售订单号
VBELN_IM LIKE MSEG-VBELN_IM ,"交货单号
NAME1 LIKE KNA1-NAME1 ,"客户
KUNNR LIKE MSEG-KUNNR ,"送达方
STRAS LIKE KNA1-STRAS ,"客户地址
BUDAT_MKPF LIKE MSEG-BUDAT_MKPF ,"出库时间
TELFX LIKE KNA1-TELFX ,"电话
USNAM_MKPF LIKE MSEG-USNAM_MKPF ,"经办人
TOTAL_BRGEW LIKE LIPS-BRGEW,"项目总毛重
BOLNR LIKE LIKP-BOLNR,"物流单号
END OF TY_HEADER.
TYPES:BEGIN OF TY_ITEMS,
VBELN_IM LIKE MSEG-VBELN_IM ,"交货单号
MATNR LIKE MSEG-MATNR ,"物料编码
ARKTX LIKE LIPS-ARKTX ,"物料描述
LGORT LIKE MSEG-LGORT ,"库存地点
MENGE LIKE MSEG-MENGE ,"数量
VRKME LIKE LIPS-VRKME ,"单位
CHARG LIKE MSEG-CHARG ,"批次
VBELP_IM LIKE MSEG-VBELP_IM ,"项目
BRGEW LIKE LIPS-BRGEW,"单项目毛重
BOLNR LIKE LIKP-BOLNR ,"物流单号
BEIZHU(20) TYPE C ,"备注
END OF TY_ITEMS.
DATA:WA_ALL TYPE TY_ALL,
GT_ALL TYPE TY_ALL OCCURS 0.
DATA:WA_HEADER TYPE TY_HEADER,
GT_HEADER TYPE TY_HEADER OCCURS 0 .
DATA:WA_ITEMS TYPE TY_ITEMS,
GT_ITEMS TYPE TY_ITEMS OCCURS 0.
*定义传入到smartforms的变量开始
DATA:fm_name TYPE rs38l_fnam.
DATA:itemsname(32) TYPE c.
DATA