문제

정렬 된 테이블에 라인을 추가 할 때 ABAP 프로그램이 짧은 덤프가있는 이유는 무엇입니까?

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" 
도움이 되었습니까?

해결책

정렬 된 테이블을 추가 할 때 프로그램은 짧은 덤프를 덤프합니다 잘못된 정렬 순서로

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"

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"

메모 당신이 가졌다면 독특한 키 같은 키를 두 번 사용하기 때문에 키가 여전히 짧은 덤프를 얻을 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top