*&---------------------------------------------------------------------*
*& Report Z_SD_CKD
*&
*&---------------------------------------------------------------------*
*&产品出库单
*&
*&---------------------------------------------------------------------*
REPORT ZSDF002.
INCLUDE ZSDF002_INC.
*INCLUDE Z_SD_CKD_INC.
TYPE-POOLS: slis.
TABLES:LIKP, KNA1, LIPS ,MKPF.
TYPES: BEGIN OF TY_ALL,
VGBEL LIKE LIPS-VGBEL ,"销售订单编号
VBELN LIKE LIKP-VBELN, "交货单号
NAME1 LIKE KNA1-NAME1,"客户 VBFA-VBELV 读取送达方客户代码和名称
KUNNR LIKE LIKP-KUNNR,"送达方
STRAS LIKE KNA1-STRAS,"客户地址
BLDAT LIKE LIKP-BLDAT,"出库时间
TELFX LIKE KNA1-TELFX,"电话
USNAM LIKE MKPF-USNAM,"经办人
MATNR LIKE LIPS-MATNR,"物料编码
ARKTX LIKE LIPS-ARKTX,"物料描述
LGORT LIKE LIPS-LGORT,"库存地点
LFIMG LIKE LIPS-LFIMG,"数量
VRKME LIKE LIPS-VRKME ,"单位
VGPOS LIKE LIPS-VGPOS,"项目
BRGEW LIKE LIPS-BRGEW,"单项目毛重
BEIZHU(20) TYPE C ,"备注
END OF TY_ALL.
TYPES:BEGIN OF TY_HEADER,
VGBEL LIKE LIPS-VGBEL ,"销售订单编号
VBELN LIKE LIKP-VBELN, "交货单号
NAME1 LIKE KNA1-NAME1,"客户 VBFA-VBELV 读取送达方客户代码和名称
KUNNR LIKE LIKP-KUNNR,"送达方
STRAS LIKE KNA1-STRAS,"客户地址
BLDAT LIKE LIKP-BLDAT,"出库时间
TELFX LIKE KNA1-TELFX,"电话
USNAM LIKE MKPF-USNAM,"经办人
TOTAL_BRGEW LIKE LIPS-BRGEW,"项目总毛重
END OF TY_HEADER.
TYPES:BEGIN OF TY_ITEMS,
ZSEL TYPE C,"选择标识
VBELN LIKE LIKP-VBELN, "交货单号
MATNR LIKE LIPS-MATNR,"物料编码
ARKTX LIKE LIPS-ARKTX,"物料描述
LGORT LIKE LIPS-LGORT,"库存地点
LFIMG LIKE LIPS-LFIMG,"数量
VRKME LIKE LIPS-VRKME ,"单位
VGPOS LIKE LIPS-VGPOS,"项目
BRGEW LIKE LIPS-BRGEW,"单项目毛重
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:headername(32) TYPE c.
*定义传入到smartforms的变量结束
*定义存储ALV向smartforms传入数据的内表开始
DATA:GT_HEADER_TEMP TYPE TY_HEADER OCCURS 0.
DATA:GT_ITEMS_TEMP