09-03-2018 12:33 PM
I´m analysing the ATC report and have a Check mesage : "DELETE statement for result of SELECT statement found"
The code is:
" SELECT <column1>FROM <table>
INTO TABLE <t1> WHERE Zvar_ID = <l_id> AND Ztbl_ID = "zzzz".
IF SY-SUBRC = 0
SORT <t1> BY ZSEQUENCE_NUM ASCENDING.
DELETE ADJACENT DUPLICATES FROM <t1> COMPARING ZSEQUENCE_NUM
ELSE
ASSERT 0 = 0.
ENDIF."
Whats the problem with code above? Why ATC marks it as a problem?
Thanks!
09-03-2018 12:35 PM
ATC is indicating that rather than select some data, then delete a subset of that, you should write your select so that it doesn't select the unwanted data in the first place.
09-05-2018 3:21 PM