Jan Ježek
Jan Ježek
So..., interesting problem: ```abap CLASS foo DEFINITION. PUBLIC SECTION. TYPES: BEGIN OF structure, value TYPE string, END OF structure. METHODS bar IMPORTING is_structure TYPE structure CHANGING is_structure2 TYPE structure is_error...
With SAP/styleguides#302 the styleguide has been changed to better describe the problem. https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#do-not-use-variables-outside-of-the-statement-block-they-are-declared-in Now it is described as:  IMHO no_inline_in_optional_branches should be deleted and replaced with new rule. Solves...
First I must say that I agree that this code is not very good and it should be rewritten into something better (probably using line_exists), so this is probably just...
```abap REPLACE ALL OCCURRENCES OF PCRE ']+)\/>' IN variable WITH ''. ``` https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapreplace.htm could be replaced with: ```abap variable = replace( val = variable pcre = `]+)\/>` with = ``...
```abap IF foo = 42. EXIT. ENDIF. LOOP AT bar ASSIGNING FIELD-SYMBOL(). IF = 42. EXIT. ENDIF. ENDLOOP. WRITE 'SOMETHING'. ``` The first EXIT should be replaced with RETURN (https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenexit_procedure_guidl.htm)...