附加排序表时的 ABAP Short Dump [英] ABAP Short Dump on append of a sorted table
本文介绍了附加排序表时的 ABAP Short Dump的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我的 ABAP 程序在我向已排序的表中附加一行时会短转储?
Why does my ABAP program short dump when I append a line to a sorted table?
ST22 显示 ITAB_ILLEGAL_SORT_ORDER
data: sorted_tab type sorted table of ty_tab with non-unique key key,
line type ty_tab.
line-key = 1.
append line to sorted_tab. "works fine"
line-key = 2.
append line to sorted_tab. "works fine"
line-key = 1.
append line to sorted_tab. "<==== Short dump here"
推荐答案
当以错误的排序顺序附加已排序的表时,程序会出现短转储
The program short dumps when appending a sorted table in the wrong sort order
data: sorted_tab type sorted table of ty_tab with non-unique key key,
line type ty_tab.
line-key = 1.
append line to sorted_tab. "works fine"
line-key = 2.
append line to sorted_tab. "works fine"
line-key = 1.
append line to sorted_tab. "<==== Short dump here"
改用插入:
data: sorted_tab type sorted table of ty_tab with non-unique key key,
line type ty_tab.
line-key = 1.
insert line into table sorted_tab. "works fine"
line-key = 2.
insert line into table sorted_tab. "works fine"
line-key = 1.
insert line into table sorted_tab. "works fine"
注意如果你有一个UNIQUE键,你仍然会得到一个简短的转储,因为你两次使用同一个键
Note If you had a UNIQUE key you would still get a short dump because you're using the same key twice
这篇关于附加排序表时的 ABAP Short Dump的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文