首页 > 数据库 >ABAP-OpenSQL-select查询操作

ABAP-OpenSQL-select查询操作

时间:2022-12-05 23:00:10浏览次数:40  
标签:sitab carrid OpenSQL 查询 WRITE ABAP select &---------------------------------

*&---------------------------------------------------------------------*
*& Report  Z13
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT z13.

DATA sitab LIKE TABLE OF spfli WITH HEADER LINE.

SELECT
  carrid    "航线代码
  connid    "航班连接 Id
  airpfrom  "起飞机场
  airpto    "目标机场
  FROM spfli INTO CORRESPONDING FIELDS OF TABLE sitab
  WHERE carrid = 'LH'.

IF sy-subrc = 0.
  WRITE '查询成功'.
  SKIP.
  LOOP AT sitab INTO sitab .
    WRITE:/ sitab-carrid.
    WRITE: sitab-connid.
    WRITE: sitab-airpfrom.
    WRITE: sitab-airpto.
  ENDLOOP.

ENDIF.

 

标签:sitab,carrid,OpenSQL,查询,WRITE,ABAP,select,&---------------------------------
From: https://www.cnblogs.com/hua900822/p/16953829.html

相关文章