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"
Use INSERT in stead:
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"