REPORT Z_TEST_COL_TO_ROW.
TYPE-POOLS: slis.
TABLES: VTTP,LIPS,LIKP,KNA1 ,VTTK.
DATA: gd_fieldcat TYPE slis_t_fieldcat_alv.
DATA: sla TYPE slis_layout_alv ,
ivariant LIKE disvariant,
i_repid LIKE sy-repid ,
i_excluding TYPE slis_t_extab.
TYPES: BEGIN OF TY_ALL,
TKNUM LIKE VTTK-TKNUM,"运单号
VBELN LIKE LIPS-VBELN,"交货单号
TPLST LIKE VTTK-TPLST ,"装运点
NAME1 LIKE KNA1-NAME1 ,"客户
ERDAT LIKE VTTK-ERDAT ,"创建日期
TDLNR LIKE VTTK-TDLNR ,"物流公司
ROUTE LIKE VTTK-ROUTE ,"线路
DISTZ LIKE VTTK-DISTZ ,"里程
ADD01 LIKE VTTK-ADD01 ,"车主
EXTI1 LIKE VTTK-EXTI1 ,"卸货点
ADD02 LIKE VTTK-ADD02 ,"司机
BFART LIKE VTTK-BFART ,"车厢类型
MATNR LIKE LIPS-MATNR,"物料编码
ARKTX LIKE LIPS-ARKTX,"物料描述
BRGEW LIKE LIPS-BRGEW,"货物单项目毛重
LFIMG LIKE LIPS-LFIMG,"单项目数量
VRKME LIKE LIPS-VRKME ,"单位
GEWEI LIKE LIPS-GEWEI,"重量单位
LGORT LIKE LIPS-LGORT,"库存地点
BEIZHU(30) TYPE C,"备注
END OF TY_ALL.
TYPES:BEGIN OF TY_HEADER,
TKNUM LIKE VTTK-TKNUM,"运单号
VBELN LIKE LIPS-VBELN,"交货单号
NAME1 LIKE KNA1-NAME1 ,"客户
TPLST LIKE VTTK-TPLST ,"装运点
ERDAT LIKE VTTK-ERDAT ,"装运日期
TDLNR LIKE VTTK-TDLNR ,"物流公司
ROUTE LIKE VTTK-ROUTE ,"线路
DISTZ LIKE VTTK-DISTZ ,"里程
ADD01 LIKE VTTK-ADD01 ,"车主
EXTI1 LIKE VTTK-EXTI1 ,"卸货点
ADD02 LIKE VTTK-ADD02 ,"司机
BFART LIKE VTTK-BFART ,"车厢类型
TOTAL_BRGEW LIKE LIPS-BRGEW,"一个交货单的总重量
END OF TY_HEADER.
*单据抬头结束
*单据明细开始
TYPES:BEGIN OF TY_ITEMS,
TKNUM LIKE VTTK-TKNUM,"运单号
VBELN LIKE LIPS-VBELN,"交货单号
NAME1 LIKE KNA1-NAME1 ,"客户
MATNR LIKE LIPS-MATNR,"物料编码
ARKTX LIKE LIPS-ARKTX,"物料描述
BRGEW LIKE LIPS-BRGEW,"单项目毛重
GEWEI LIKE LIPS-GEWEI,"重量单位
LFIMG LIKE LIPS-LFIMG,"单项目数量
VRKME LIKE LIPS-VRKME ,"单位
LGORT LIKE LIPS-LGORT,"库存地点
BEIZHU(30) TYPE C,"备注
END OF TY_ITEMS.
*单据明细结束
DATA:WA_ALL TYPE TY_ALL,
GT_ALL TYPE TY_ALL OCCURS 0.
DATA
转载于:https://www.cnblogs.com/eagle-dtq/p/5195765.html