Abap DELETE - duplicates
今天發現自已一直忽視了一個問題, DELETE - duplicates 刪除內表重復記錄語句是有條件限制的,必需是依據關鍵字或你定義的字段排序后才行。
仔細看了一下它的文檔,確實是它只能對相鄰的相同的記錄做刪除。因為這個忽視,找了n久都沒找到程序的 bug 在哪,潛意識里不會想到 DELETE - duplicates 會是這樣的定義,范了最低級的錯誤,學習不夠嚴謹,下不違例。
?
DELETE - duplicates Syntax ... ADJACENT DUPLICATES FROM itab ???????????? [COMPARING { comp1 comp2 ...}|{ALL FIELDS}]... . Addition: ... COMPARING {comp1 comp2 ...}|{ALL FIELDS}
Effect With these additions, the statement DELETE deletes all lines in certain groups of lines, except for the first line of the group. These are groups of lines that follow one another and have the same content in certain components. If the addition COMPARING is not specified, the groups are determined by the content of the key fields.
Lines are considered to be doubled if the content of neighboring lines is the same in the components examine
總結
以上是生活随笔為你收集整理的Abap DELETE - duplicates的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Web Dynpro for ABAP
- 下一篇: 处理您的请求时发生错误(Web Dynp