REPORT ztest_tanp_getdata LINE-SIZE 71.
*数据对象定义
DATA:wa_spfli TYPE spfli,
it_spfli LIKE STANDARD TABLE OF wa_spfli.
*将数据从数据库读入内表
SELECT * FROM spfli
INTO TABLE it_spfli.
*画条横线
ULINE.
FORMAT COLOR COL_HEADING.
WRITE: / sy-vline,AT 2(10) 'Carrid',
sy-vline,AT 14(10) 'Connid',
sy-vline,AT 26(10) 'Country From',
sy-vline,AT 49(10) 'Country To',
AT 71 sy-vline.
ULINE.
FORMAT RESET.
*从内表把数据读到工作区输出数据
LOOP AT it_spfli INTO wa_spfli.
WRITE: / sy-vline,AT 2(10) wa_spfli-carrid COLOR COL_KEY,
sy-vline,AT 14(10) wa_spfli-connid COLOR COL_KEY,
sy-vline,AT 26(10) wa_spfli-countryfr,
sy-vline,AT 49(10) wa_spfli-countryto,
AT 71 sy-vline.
ULINE.
ENDLOOP.
转载于:https://www.cnblogs.com/zxiu/p/7427991.html