- UID
- 10663728
- 阅读权限
- 20
- 帖子
- 1571
- 精华贴数
- 0
- 技术排名
- 872
- 技术积分
- 2630
- 社区排名
- 2624
- 社区积分
- 348
- 注册时间
- 2007-8-1
- 精华贴数
- 0
- 技术积分
- 2630
- 社区积分
- 348
- 注册时间
- 2007-8-1
- 论坛徽章:
- 14
|
发表于 2008-5-15 17:22:39
|显示全部楼层
types: begin of ty_test,
aa type i,
bb type i,
sum type i,
end of ty_test.
data: it_test type table of ty_test,
wa_test type ty_test,
wa_temp type ty_test.
wa_test-aa = 1111.
wa_test-bb = 1.
append wa_test to it_test.
clear wa_test.
wa_test-aa = 2222.
wa_test-bb = 2.
append wa_test to it_test.
clear wa_test.
wa_test-aa = 3333.
wa_test-bb = 3.
append wa_test to it_test.
clear wa_test.
wa_test-aa = 4444.
wa_test-bb = 4.
append wa_test to it_test.
clear wa_test.
sort it_test by aa descending.
loop at it_test into wa_test.
wa_test-sum = wa_temp-sum.
wa_temp-sum = wa_temp-sum + wa_test-bb.
write: / wa_test-aa, wa_test-bb, wa_test-sum.
endloop. |
|