首先,看一下标准的官方解释:
This addition to the statements DATA TABLEOF, DATA RANGEOF, and the obsolete statement DATAOCCURS (which is not allowed in classes) declares afurther data object alongside the internal table, known as theheader line. This object hasexactly the same name as the internal table and has the row type ofthe internal table as its data type. A header line cannot bedeclared for internal tables with a table-like row type. This ispossible for structured row types with table-like components,however.
我用中文总结一下:
OCCURS与HEADERLINE都是用来定义内表的语句,OCCURS是3.0版本之前的语句,在4.0系统中已经过时,不推荐使用。但是前者在定义一个内表的同时,还定义了一个数据对象(这个东西其实就是一个工作区,与内表的结构是完全一样的,之后也就演变成了所谓的headerline)。
本文转自:http://blog.sina.com.cn/s/blog_6fd0fd4b01017jl4.html

本文介绍了ABAP中内表声明的方式,包括OCCURS和HEADERLINE两种语句。OCCURS为早期版本使用,现已过时;HEADERLINE则在声明内表时同时创建一个具有相同结构的数据对象,即headerline。
182

被折叠的 条评论
为什么被折叠?



