Skip to Content
0
Sep 03, 2018 at 11:33 AM

Why the ATC message "Search SELECT statement with DELETE" is a problem ?

2459 Views

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!