正文部分
代码语言:javascript
复制
*数据库表spfli相关
TABLES: spfli, sflight.
START-OF-SELECTION.
SKIP.
*输出
ULINE AT /(91).
WRITE: / sy-vline,(15) '航线承运人', sy-vline , (15) '航班连接', sy-vline,
(15) '国家代码', sy-vline,(15) '起飞城市', sy-vline,
(15) '起飞机场',sy-vline.
ULINE AT /(91).
*输出
SELECT * FROM spfli.
WRITE: / sy-vline,(15) spfli-carrid,sy-vline,
(15) spfli-connid,sy-vline,
(15) spfli-countryto,sy-vline,
(15) spfli-cityfrom,sy-vline,
(15) spfli-airpfrom, sy-vline.
* 隐藏关键字
HIDE: spfli-carrid,spfli-connid.
ULINE AT /(91).
ENDSELECT.
AT LINE-SELECTION.
*只输出第一页
IF sy-lsind = 1.
*根据隐藏字段读取并打印从表
SELECT * FROM sflight
WHERE carrid = spfli-carrid AND connid = spfli-connid.
WRITE: / sflight-carrid,sy-vline,sflight-connid,
sy-vline,sflight-fldate,sy-vline,sflight-price.
ENDSELECT.
ENDIF.