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
Ranges cause syntaxerror after cleanup if used as type for other variables #439
If a range is used as a type in a different variable, the order in which the cleaner sorts is important. As far as i can tell ABAP-Cleaner always puts ranges after the data declarations but that does not always work:
Before Cleaner:
formtest.
ranges r_matnr for mara-matnr.
data ls_matnr like line of r_matnr.
data(test1) = r_matnr.
data(test2) = ls_matnr.
endform.
After Cleaner:
formtest.
data ls_matnr like line of r_matnr.
ranges r_matnr for mara-matnr.
data(test1) = r_matnr.
data(test2) = ls_matnr.
endform.
A lot of our legacy code is programmed in this way and this causes a lot of issues with ABAP-Cleaner
thanks a lot for reporting this! RANGES is an obsolete declaration statement, but nevertheless, ABAP cleaner shouldn't introduce syntax errors, of course. This bug should be fixed with the next release:
Activity
jmgrassau commentedon Sep 10, 2025
Hi Clemens,
thanks a lot for reporting this! RANGES is an obsolete declaration statement, but nevertheless, ABAP cleaner shouldn't introduce syntax errors, of course. This bug should be fixed with the next release:
Kind regards,
Jörg-Michael
fix LocalDeclarationOrderRule for obsolete RANGES declaration (SAP#439)
fix LocalDeclarationOrderRule for obsolete RANGES declaration (#439)
jmgrassau commentedon Sep 11, 2025
Hi Clemens,
this should now be fixed in version 1.21.3, which was just released – thanks again for opening this issue!
Kind regards,
Jörg-Michael