Abap DELETE - duplicates
今天發(fā)現(xiàn)自已一直忽視了一個(gè)問題, DELETE - duplicates 刪除內(nèi)表重復(fù)記錄語句是有條件限制的,必需是依據(jù)關(guān)鍵字或你定義的字段排序后才行。
仔細(xì)看了一下它的文檔,確實(shí)是它只能對(duì)相鄰的相同的記錄做刪除。因?yàn)檫@個(gè)忽視,找了n久都沒找到程序的 bug 在哪,潛意識(shí)里不會(huì)想到 DELETE - duplicates 會(huì)是這樣的定義,范了最低級(jí)的錯(cuò)誤,學(xué)習(xí)不夠嚴(yán)謹(jǐn),下不違例。
?
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
總結(jié)
以上是生活随笔為你收集整理的Abap DELETE - duplicates的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Web Dynpro for ABAP
- 下一篇: 处理您的请求时发生错误(Web Dynp