ATC Check Error: Empty SELECT/ENDSELECT Problematic Statements
ABAP Test Cockpit ATC check variant executed on SAP S/4HANA systems can be configured to list empty SELECT / ENDSELECT statements under Problematic Statements.
ABAP Test Cockpit ATC checks problematic statements on SAP S4HANA like empty SELECT/ENDSELECT statements that can be suppressed with pseudo comment CI_NOORDER
In ATC checks result list, I had items listed with following details
Search problematic statements for result of SELECT/OPEN CURSOR without ORDER BY
Empty SELECT/ENDSELECT at ... line ...
Priority 3
Empty SELECT/ENDSELECT at /KODYAZ/ZPROGRAM01 line 462
Finding can be suppressed with pseudo comment CI_NOORDER
If ABAP programmer decides to suppress the ATC check error for Empty SELECT/ENDSELECT statements, pseudo comment CI_NOORDER can be used as seen in below ABAP code sample
Although supressing the error with pseudo comment #EC CI_NOORDER instead of solving it with proper ABAP coding is not the best way of dealing with such ATC check results for improving code quality, it is an option for ABAP programmers to get rid of such ATC checks at the end.
The best solution also ensuring to read the correct data from SAP database is using the appropriate sort order with ORDER BY clause in SELECT statement.
Hope that helps for improving your code quality.