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
Applying the ABAP Cleaner on old reports with SELECT / ENDSELECT unfortunatelly creates "unwanted" behaviours.
Important:
please handle SELECT / ENDSELECT as a loop, too in rule "Convert CHECK inside a loop to IF NOT..." otherwise the rule "Convert CHECK outside loop" takes over.
Example:
SELECT * FROM mara
WHERE matnr = '0815'
INTO @DATA(mat_master).
CHECK 4711 = 0815.
WRITE / 'This is a loop, too.'.
ENDSELECT.
WRITE / 'This is the end'.
Will be converted to
SELECT * FROM mara
WHERE matnr = '0815'
INTO @DATA(mat_master).
IF 4711 <> 0815.
RETURN.
ENDIF.
WRITE / 'This is a loop, too.'.
ENDSELECT.
WRITE / 'This is the end'.
Which is obviously not the same, because the RETURN immediatelly leaves the FORM/METHOD/Program and not only the loop -> the code after the ENDSELECT will not be executed.
If there's a SAP Insidetrack Walldorf or something similar I'll be there. Unfortunatelly I'm not invited to DKOM anymore ;-)
You can follow me on Mastodon @se38@nrw.social (my Twitter account @se38 is inactive for reasons)
Activity
jmgrassau commentedon Jul 5, 2023
Hi Uwe,
uh oh, that's not good, of course – but shouldn't be too difficult to fix. Thanks a lot for reporting this!
Kind regards,
Jörg-Michael
jmgrassau commentedon Jul 5, 2023
Hi Uwe,
okay, the issue is fixed now; I will create a new release later today, because this is really the kind of bug we don't want to have in ABAP cleaner!
Kind regards,
Jörg-Michael
se38 commentedon Jul 5, 2023
Great to hear, we owe you a beer or two. Hope to meet you in real life in the near future.
Cheers, Uwe
fix CheckIn/OutsideLoopRule for SELECT...ENDSELECT (SAP#71)
fix CheckIn/OutsideLoopRule for SELECT...ENDSELECT (#71)
jmgrassau commentedon Jul 5, 2023
Hi Uwe,
very kind, thank you! Let me know if you are around Walldorf :-)
Taking this as an exercise in how fast deployment works if needed – so, this issue should be fixed in version 1.5.0, which was just released!
Kind regards,
Jörg-Michael
se38 commentedon Jul 5, 2023
New release works perfect, thank you.
If there's a SAP Insidetrack Walldorf or something similar I'll be there. Unfortunatelly I'm not invited to DKOM anymore ;-)
You can follow me on Mastodon @se38@nrw.social (my Twitter account @se38 is inactive for reasons)