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

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

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

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

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值