I'm dealing with legacy code where the coder has that habit of more than one statement. So: ``` READ TABLE lt_children WITH KEY agr_name = iv_agr_name child_agr = iv_child_agr TRANSPORTING NO FIELDS. " ASSIGNING <child>. IF sy-subrc EQ 0. rv_assigned = 'X'. ENDIF. ``` Becomes ``` IF line_exists( lt_children[ agr_name = iv_agr_name child_agr = iv_child_agr ] ). " ASSIGNING <child>. rv_assigned = 'X'. ENDIF. ``` Thus, the code is syntactically incorrect. The correct would be: ``` IF line_exists( lt_children[ agr_name = iv_agr_name child_agr = iv_child_agr ] ). " ASSIGNING <child>. rv_assigned = 'X'. ENDIF. ```
Activity
jmgrassau commentedon Jul 2, 2025
Hi Matthew,
oh, that's not good … it will be fixed with the next release, where line breaks are enforced before the next statement, as well as before the ENDIF:
Kind regards,
Jörg-Michael
fix ReadTableRule for IF ... ENDIF on same line (SAP#413)
fix ReadTableRule for IF ... ENDIF on same line (#413)
jmgrassau commentedon Jul 8, 2025
Hi Matthew,
thanks a lot for reporting this issue – this should now be fixed with version 1.21.2!
Kind regards,
Jörg-Michael