简单话内表(internal table)(转)

内表是一个运行状态下存在的实例,它在程序开始运行时才生成,在程序结束运行时被销毁。

内表包含两个部分,可有可无的标题行(HeaderLine),和必需的表身。进出内表的值都必须通过标题行。

程序例子:

* 声明
data: begin of itab occurs 0,
x type c,
y type i,
end of itab.

* 初始化标题行 headerline
itab-x = ‘d’.
itab-y = 34.

* 向内表中存入值
appene itab.
appene itab.
appene itab.

* 读取内表中的值
loop at itab .
write: / itab-x, itab-y. “输出列表
endloop.

原文地址:https://www.cnblogs.com/levin/p/1537848.html