abap 中的内表操作
来源:互联网 发布:mac添加不了qq邮箱 编辑:程序博客网 时间:2024/06/04 17:59
- 声明内表
(1)
data: begin of itab occurs 0,
a type c,
end of itab.
data: begin of itab occurs 0.
include structure mara.
include type ty_self.
data a type c.
data:end of itab.
(2)
DATA itab TYPE TABLE OF t-tab WITH HEADER LINE.
(3)
DATA itab like table of stuc WITH HEADER LINE.
DATA itab TYPE table of rowtype WITH HEADER LINE.
(4)
DATA itab LIKE itab OCCURS 0 WITH HEADER LINE.
DATA itab type tabtype WITH HEADER LINE.
- 类型定义
针对于内表与结构,类型也有表类型和行类型之分。
types: begin of ty_itab ,
a type c,
end of ty_itab.
types:ty_itab1 type table of ty_itab.
types:ty_itab2 type line of ty_itab1.
types: begin of ty_itab .
include structure mara.
include type ty_itab.
types: data a type c,
end of itab.
types:aa type ty_itab.
types:bb type ty_itab occurs 0.
types: cc like itab occurs 0.
types: cc like itab .
- 内表清空
refresh itab "清除内表数据
clear itab "清除没有headerline的内表数据,或者有headerline的内表工作区数据。
free itab " 清除内表内容,并收回内存
- 内表数据删除
(1) delete itab where name = 'northsnow'.
(2) delete itab index i. (利用 sy-tabix)
(3)
loop at itab.
delete itab. 相当于delete itab index i. ,只不过是省略了 index i
endloop.
或者
loop at itab.
delete itab index sy-tabix.
endloop.
(4)
delete itab from n1 to n2 (利用 sy-tabix)
(5) delete itab from wa 根据关键字删除
(6) DELETE ADJACENT DUPLICATES FROM itab
COMPARING fieldlist. 删除重复的数据
where 条件和 from to 条件可以同时使用,处理两个条件的交集
- 内表记录数
(1) data a type i.
a = lines( itab ).
(2) data a type i.
describe table itab lines a.
- abap 中的内表操作
- ABAP内表操作
- ABAP内表操作
- ABAP~ 内表操作
- ABAP内表常用操作
- abap内表的操作_例子
- abap内表的操作汇总
- ABAP 删除内表中的重复行
- ABAP 内表总结-2 整体内表的操作
- ABAP 内表总结-2 整体内表的操作
- 关于ABAP内表
- ABAP-内表
- ABAP动态内表
- 【ABAP】内表类型
- ABAP动态内表
- abap内表
- 关于ABAP内表
- ABAP-动态内表
- 如何在C#中使用内嵌资源文件
- 用MASM32写GUI版的netstat--NetViewG.exe v0.0.0001 beta1
- sql技巧
- 自定義彈出控件(下)
- Delphi中initialization和finalization
- abap 中的内表操作
- Oracle触发器详细介绍
- 架设 DNS 所需要的套件
- GridView自动编号
- FreeBSD 7.0 Release已放出,可以下载了
- 改的检测current mounted的removable device的代码
- ioctl函数介绍
- Awk学习
- 使用 Velocity 实现客户端和服务器端模板