标签:
*&---------------------------------------------------------------------*
*& Report ZSDR031
*&
*&---------------------------------------------------------------------*
*&程序名称:分货日报表导出
*&事物代码:
*&导入模板:xls(上传对象名为:ZSD_XLS_011)
*&作者:
*&时间:
*&更新时间:
*&----------------------------------
REPORT zsdr031.
TABLES: vttp,lips,likp,kna1 ,vttk, ztmm001,ztbjdyzt.
INCLUDE ole2incl.
FIELD-SYMBOLS: <f_fs1> , <f_fs2>.
DATA: gs_fcat TYPE lvc_s_fcat,
gt_fcat TYPE lvc_t_fcat,
gs_layo TYPE lvc_s_layo,
gs_grid TYPE lvc_s_glay.
DATA: gt_event TYPE slis_t_event WITH HEADER LINE,
gt_event_exit TYPE slis_t_event_exit WITH HEADER LINE.
DATA: ref_grid TYPE REF TO cl_gui_alv_grid .
DATA: excel TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cell TYPE ole2_object,
column TYPE ole2_object,
row TYPE ole2_object.
TYPES: BEGIN OF ty_all,
vbeln LIKE likp-vbeln, "交货单号
btgew LIKE likp-btgew, "总重量
ntgew LIKE likp-ntgew, "净重量
gewei LIKE likp-gewei, "重量单位
vstel LIKE likp-vstel, "装运点
vstel_txt LIKE tvstt-vtext, "装运点描述
route LIKE likp-route, "路线
route_txt LIKE tvrot-bezei, "路线描述
lfart LIKE likp-lfart, "交货类型
lfart_txt LIKE tvlkt-vtext, "交货类型描述
vbtyp LIKE likp-vbtyp, "凭证类型
kunag LIKE likp-kunag, "售达方
kunag_txt LIKE kna1-name1, "售达方名称
kunnr LIKE likp-kunnr, "送达方
kunnr_txt LIKE kna1-name1, "送达方名称
erdat LIKE likp-erdat, "交货单创建日期
vgbel LIKE lips-vgbel, "参考的销售订单
lfstk LIKE vbuk-lfstk, "货物移动状态
posnr LIKE lips-posnr, "项目
matnr LIKE lips-matnr, "物料代码
lfimg LIKE lips-lfimg, "交货数量
vrkme LIKE lips-vrkme , "单位
beizhu(30) TYPE c, "备注
END OF ty_all.
TYPES:BEGIN OF ty_header,
vbeln LIKE likp-vbeln, "交货单号
btgew LIKE likp-btgew, "总重量
ntgew LIKE likp-ntgew, "净重量
gewei LIKE likp-gewei, "重量单位
vstel LIKE likp-vstel, "装运点
vstel_txt LIKE tvstt-vtext, "装运点描述
route LIKE likp-route, "路线
route_txt LIKE tvrot-bezei, "路线描述
lfart LIKE likp-lfart, "交货类型
lfart_txt LIKE tvlkt-vtext, "交货类型描述
vbtyp LIKE likp-vbtyp, "凭证类型
kunag LIKE likp-kunag, "售达方
kunag_txt LIKE kna1-name1, "售达方名称
kunnr LIKE likp-kunnr, "送达方
kunnr_txt LIKE kna1-name1, "送达方名称
erdat LIKE likp-erdat, "交货单创建日期
vgbel LIKE lips-vgbel, "参考的销售订单
lfstk LIKE vbuk-lfstk,