ABAP里面的OCCURS与HEADER LINE之间的一些区别

来源:互联网 发布:js中的tostring方法 编辑:程序博客网 时间:2024/04/29 11:31

首先,看一下标准的官方解释:

This addition to the statements DATA TABLEOF,DATA RANGEOF, and the obsolete statementDATAOCCURS (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

0 0