逻辑数据库的用法

 tables: scustom, scarr, spfli, sflight, sbook.
*nodes: spfli, sflight, sbook.
data: begin of gt_logic occurs 0,
      carrid type scarr-carrid,
      carrname type scarr-carrname,
      connid type sflight-connid,
      fldate type sflight-fldate,
      cityfrom type spfli-cityfrom,
      cityto type spfli-cityto,
      bookid type sbook-bookid,
      customid type sbook-customid,
      name type scustom-name,
      paymentsum type sflight-paymentsum,
      end of gt_logic.
data: v_book_num type value 0.

*      get sflight late.
*      get spfli late.
*      select carrid cityfrom cityto into corresponding fields of table gt_logic from spfli.
selection-screen begin of block blk1 with frame title text-002.
  selection-screen begin of line.
    selection-screen comment 1(30) text-003.
    parameters p_books type obligatory.
  selection-screen end of line.
selection-screen end of block blk1.
start-of-selection.
      write:/(20) 'Carrier name',
             (15) 'Connection Id',
             (15) 'Flight date',
             (10) 'City from',
             (10) 'City to',
             (10) 'Book number',
             (20) 'Passenger name',
             (15) 'Amount in local currency'.
      get spfli.
      gt_logic-carrid = spfli-carrid.
      gt_logic-cityfrom = spfli-cityfrom.
      gt_logic-cityto = spfli-cityto.
      get sflight.
      v_book_num = 0.
      gt_logic-connid = sflight-connid.
      gt_logic-fldate = sflight-fldate.
      gt_logic-paymentsum = sflight-paymentsum.
      get sbook.
      v_book_num = v_book_num + 1.
      check v_book_num le 10.
      gt_logic-bookid = sbook-bookid.
      gt_logic-customid = sbook-customid.
      write:/(20) gt_logic-carrname,
             (15) gt_logic-connid,
             (15) gt_logic-fldate,
             (10) gt_logic-cityfrom,
             (10) gt_logic-cityto,
             (10) gt_logic-bookid,
             (20) gt_logic-name,
             (15) gt_logic-paymentsum.
*      append gt_logic.
      get sflight late.
        format color 3.
          write:/ 'Plane type: ', sflight-planetype,
                / 'Occupied seats:', sflight-seatsocc,
                / 'Total of current booking:',sflight-paymentsum.
          uline.
        format color off.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值