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
Align logical expressions: WHERE condition of FOR not aligned? #29
DATA lt_vbak TYPE TABLE OF vbak.
DATA lt_result LIKE lt_vbak.
lt_result = VALUE #( FOR ls_vbak IN lt_vbak WHERE
( vbeln = '1'
AND auart = 'A' )
( ls_vbak ) ).
Above is an example in which the line AND auart = 'A' ) is not automatically aligned with the rest. It is only aligned if the previous line ( vbeln = '1' would also be aligned simultaneously. Is this a bug or is the behavior intended?
changed the title [-]Align parameters and components: WHERE condition of FOR not aligned?[/-][+]Align logical expressions: WHERE condition of FOR not aligned?[/+]on May 25, 2023
there were actually even three different issues to this, but "Align logical expressions" now behaves as expected:
However, IMHO, "WHERE" is not in a good place here: Since it starts the WHERE clause, it should be next to the logical expression, not somewhere at the end of the line above it. Therefore, the rule "Move AND/OR etc. from line end to next line start" was enhanced with a new option:
which results in:
If you put these effects together, you get:
which I think makes this expression even more readable :-)
Activity
jmgrassau commentedon May 25, 2023
Hi ConjuringCoffee,
actually this would be a case for the "Align logical expressions" rule which indeed does not yet consider WHERE clauses in constructor expressions!
Kind regards,
Jörg-Michael
[-]Align parameters and components: WHERE condition of FOR not aligned?[/-][+]Align logical expressions: WHERE condition of FOR not aligned?[/+]jmgrassau commentedon Jun 9, 2023
Hi ConjuringCoffee,
there were actually even three different issues to this, but "Align logical expressions" now behaves as expected:
However, IMHO, "WHERE" is not in a good place here: Since it starts the WHERE clause, it should be next to the logical expression, not somewhere at the end of the line above it. Therefore, the rule "Move AND/OR etc. from line end to next line start" was enhanced with a new option:
which results in:
If you put these effects together, you get:
which I think makes this expression even more readable :-)
Kind regards,
Jörg-Michael
enhance LogicalOperatorPositionRule with option to 'Move keywords' (S…
fix alignment rules for FOR ... IN ... WHERE ( ... ) (SAP#29)
enhance LogicalOperatorPositionRule with option to 'Move keywords' (#29)
fix alignment rules for FOR ... IN ... WHERE ( ... ) (#29)
jmgrassau commentedon Jun 12, 2023
Hi ConjuringCoffee,
hope release 1.4.0 does the trick :-)
Kind regards,
Jörg-Michael