*Deal Data with Internal Table
*从表scarr里面读取信息
*用scarr定义一个结构
DATA wa_scarr TYPE scarr.
*定义内表
DATA it_scarr TYPE TABLE OF scarr.
*选择数据
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_scarr
FROM scarr.
*检查数据
IF sy-subrc = 0.
*遍历内表
LOOP AT it_scarr INTO wa_scarr.
WRITE: / wa_scarr-carrid,wa_scarr-carrname,wa_scarr-currcode.
ENDLOOP.
ELSE.
*输出
WRITE: ‘Data Not Found!‘.
ENDIF.
时间: 2024-10-03 22:54:28