
2008-7-3 15:51
aneasn001
求助ABAP----两个语法无效
REPORT z000_test LINE-SIZE 300.
types: begin of test_ty,
val01 type i,
val02 type i,
val03 type i,
end of test_ty.
data: test_itab type standard table of test_ty.
data: test_wa type test_ty.
set left scroll-boundary column test_wa-val01. "一列不卷动 ---无效
do 5 times .
test_wa-val01 = test_wa-val01 + 1.
test_wa-val02 = test_wa-val02 + 2.
test_wa-val03 = test_wa-val03 + 3.
append test_wa to test_itab.
enddo.
append test_wa to test_itab.
clear test_wa.
sort test_itab by val01 val02 val03.
delete adjacent duplicates from test_itab. " 删除相同的列 ---无效
loop at test_itab into test_wa.
write:/ test_wa-val01,test_wa-val02,test_wa-val03.
endloop.
2008-7-3 16:07
ryq0000
val01 - val03
全是I类型
其中的一个换成字符试试呢?
[[i] 本帖最后由 ryq0000 于 2008-7-3 16:23 编辑 [/i]]
2008-7-3 16:08
aneasn001
不知道这里的两个语法为什么输出的时候没有起到效果 请高手指点。
2008-7-3 16:11
aneasn001
第二个删除相同行的问题解决了 改成C型就行了
第一个问题知道我写的对不对。
2008-7-3 16:24
ryq0000
[quote]原帖由 [i]aneasn001[/i] 于 2008-7-3 16:11 发表 [url=http://www.itpub.net/redirect.php?goto=findpost&pid=10843532&ptid=1016096][img]http://www.itpub.net/images/common/back.gif[/img][/url]
第二个删除相同行的问题解决了 改成C型就行了
第一个问题知道我写的对不对。 [/quote]
第一个问题我没用过,不知道是啥意思,
你可以看下帮助.
2008-7-3 16:25
aneasn001
[quote]原帖由 [i]ryq0000[/i] 于 2008-7-3 16:24 发表 [url=http://www.itpub.net/redirect.php?goto=findpost&pid=10843726&ptid=1016096][img]http://www.itpub.net/images/common/back.gif[/img][/url]
第一个问题我没用过,不知道是啥意思,
你可以看下帮助. [/quote]
非常谢谢!刚刚开始学ABAP。
2008-7-3 16:54
ruiyun
1. 'SET LEFT SCROLL-BOUNDARY COLUMN col' means to fix the columns before col when you scrolling.
col 's value is the system variant SY-COLNO, not your table column. you can use debug to see the current column number.
2. DELETE ADJACENT DUPLICATES FROM test_itab [color=Red]comparing all fields[/color].
learn to use F1 help to solve the easy problems by yourself, it will help you more.
by the way ,you need to write more columns if you want to see the effect of 'SET LEFT SCROLL-BOUNDARY COLUMN col' .
2008-7-3 16:59
ryq0000
[quote]原帖由 [i]ruiyun[/i] 于 2008-7-3 16:54 发表 [url=http://www.itpub.net/redirect.php?goto=findpost&pid=10844213&ptid=1016096][img]http://www.itpub.net/images/common/back.gif[/img][/url]
1. 'SET LEFT SCROLL-BOUNDARY COLUMN col' means to fix the columns before col when you scrolling.
col 's value is the system variant SY-COLNO, not your table column. you can use debug to see the current column number.
2. DELETE ADJACENT DUPLICATES FROM test_itab comparing all fields.
learn to use F1 help to solve the easy problems by yourself, it will help you more.
by the way ,you need to write more columns if you want to see the effect of 'SET LEFT SCROLL-BOUNDARY COLUMN col' . [/quote]
:right:
2008-7-3 20:17
tieshou444
是不是列还不够多,LINE-SIZE 300设的小点,或者多输入几列超过300
2008-7-4 10:06
xiebinren
REPORT z000_test LINE-SIZE 300.
types: begin of test_ty,
val01 type i,
val02 type i,
val03 type i,
end of test_ty.
data: test_itab type standard table of test_ty WITH NON-UNIQUE KEY val01 val02 val03.
data: test_wa type test_ty.
do 5 times .
test_wa-val01 = test_wa-val01 + 1.
test_wa-val02 = test_wa-val02 + 2.
test_wa-val03 = test_wa-val03 + 3.
append test_wa to test_itab.
enddo.
append test_wa to test_itab.
clear test_wa.
sort test_itab by val01 val02 val03.
delete adjacent duplicates from test_itab. " 删除相同的列
loop at test_itab into test_wa.
*set left scroll-boundary. "这个你也可试一下,体会一下与其他的有什么区别
*set left scroll-boundary column 15. "这个你也可试一下,体会一下与其他的有什么区别
*set left scroll-boundary column test_wa-val03. "这个你也可试一下,体会一下与其他的有什么区别
set left scroll-boundary column test_wa-val01. "固定
write:/ test_wa-val01 COLOR COL_KEY, test_wa-val02,(20) test_wa-val03.
endloop.
1.你放的位置不对,你自己慢慢体会吧
2.data: test_itab type standard table of test_ty 修改为:
data: test_itab type standard table of test_ty with non-unique key val01 val02 val03.
[[i] 本帖最后由 xiebinren 于 2008-7-4 10:11 编辑 [/i]]
2008-7-4 10:16
king2127
学习
2008-7-4 14:50
dreamgift
[quote]原帖由 [i]xiebinren[/i] 于 2008-7-4 10:06 发表 [url=http://www.itpub.net/redirect.php?goto=findpost&pid=10850905&ptid=1016096][img]http://www.itpub.net/images/common/back.gif[/img][/url]
REPORT z000_test LINE-SIZE 300.
types: begin of test_ty,
val01 type i,
val02 type i,
val03 type i,
end of test_ty.
data: test_itab type standard table of test_ty WITH NON-UNIQUE KEY val01 val02 val03.
data: test_wa type test_ty.
do 5 times .
test_wa-val01 = test_wa-val01 + 1.
test_wa-val02 = test_wa-val02 + 2.
test_wa-val03 = test_wa-val03 + 3.
append test_wa to test_itab.
enddo.
append test_wa to test_itab.
clear test_wa.
sort test_itab by val01 val02 val03.
delete adjacent duplicates from test_itab. " 删除相同的列
loop at test_itab into test_wa.
*set left scroll-boundary. "这个你也可试一下,体会一下与其他的有什么区别
*set left scroll-boundary column 15. "这个你也可试一下,体会一下与其他的有什么区别
*set left scroll-boundary column test_wa-val03. "这个你也可试一下,体会一下与其他的有什么区别
set left scroll-boundary column test_wa-val01. "固定
write:/ test_wa-val01 COLOR COL_KEY, test_wa-val02,(20) test_wa-val03.
endloop.
1.你放的位置不对,你自己慢慢体会吧
2.data: test_itab type standard table of test_ty 修改为:
data: test_itab type standard table of test_ty with non-unique key val01 val02 val03. [/quote]
:right: :right: :right:
学习了.
2008-7-4 16:04
sorrowlich
:rose:
2008-7-6 08:51
duanfenglan
学习
2008-7-7 10:42
aneasn001
I know "set left scroll-boundary column col." .
it's to set screen not scrolling size When this list page is displayed on the screen.
2008-7-8 10:10
heitian1130
append test_wa to test_itab.
clear test_wa.
请问在do 5 time 里面已经有 append test_wa to test_itab. 你clear test_wa 上面的那个append test_wa to test_itab. 是不是多余的
2008-7-9 09:13
aneasn001
回复 #16 heitian1130 的帖子
it's to product a similar list for checking "delete adjacent duplicates from test_itab"
2008-7-9 18:43
ryq0000
:rose:
页:
[1]

Powered by ITPUB论坛