You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AbapCleaner does change the below block to use @FINAL(...) instead of @DATA(...) which is not syntaxtically correct #508
changed the title [-]AbapCleaner does change the below block to @FINAL(...) which is not syntaxtically correct[/-][+]AbapCleaner does change the below block to use @FINAL(...) instead of @DATA(...) which is not syntaxtically correct[/+]on May 4, 2026
thanks a lot for reporting this bug. The issue here is that FINAL is a rather new keyword (introduced with ABAP release 7.57), and if it is used, the SELECT statement has to follow the "strict mode" rules of that release. This one doesn't, because for that, UP TO 1 ROWS would need to be positioned after the INTO clause.
Strict mode rules are no trivial topic, and unfortunately, some of them cannot be checked by ABAP cleaner due to missing backend access. However, I tried to cover some important cases, so with the next release, "Use FINAL for immutable variables" will identify your example as non-strict (and refrain from introducing FINAL into it), while it will still use FINAL in the modified code:
Activity
[-]AbapCleaner does change the below block to @FINAL(...) which is not syntaxtically correct[/-][+]AbapCleaner does change the below block to use @FINAL(...) instead of @DATA(...) which is not syntaxtically correct[/+]jmgrassau commentedon Sep 11, 2026
Hi prokopp80,
thanks a lot for reporting this bug. The issue here is that FINAL is a rather new keyword (introduced with ABAP release 7.57), and if it is used, the SELECT statement has to follow the "strict mode" rules of that release. This one doesn't, because for that,
UP TO 1 ROWSwould need to be positioned after theINTOclause.Strict mode rules are no trivial topic, and unfortunately, some of them cannot be checked by ABAP cleaner due to missing backend access. However, I tried to cover some important cases, so with the next release, "Use FINAL for immutable variables" will identify your example as non-strict (and refrain from introducing FINAL into it), while it will still use FINAL in the modified code:
Kind regards,
Jörg-Michael
fix FinalVariableRule for SELECT in non-strict mode (#508)
jmgrassau commentedon Oct 30, 2026
Hi prokopp80,
thanks again for reporting this – this bug should now be fixed with version 1.29.2, which was released today!
Kind regards,
Jörg-Michael