Skip to content

Wrong rearrange of local declarations #258

Closed

Description

@JoachimEck

Hello Jörg-Michael,

it's me again. I have a problem with an old programme. When I run the ABAP Cleaner, the declaration is moved to the top and the variable in the MODULE loses its reference to it. So i can't activate it anymore. I think the variable should be moved to the very beginning. I have narrowed down the programme as much as possible so that the error continues to occur. Enclosed is the profile I am using. The ABAP Cleaner version is 1.30.1.
image

REPORT.
DATA lv_any TYPE sy-ucomm.

PARAMETER variante TYPE slis_vari.

INITIALIZATION.

AT SELECTION-SCREEN OUTPUT.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR variante.
 
  MODULE test INPUT.
    DATA lv_problem TYPE c LENGTH 20.
    lv_problem = 'Something'.
  ENDMODULE.

Activity

  1. JoachimEck commented on Feb 27, 2024

    @JoachimEck
    Author

    If i put a "START-OF-SELECTION" between the Value-Request and the Module it works fine.

  2. jmgrassau commented on Feb 27, 2024

    @jmgrassau
    Member

    Hi Joachim,

    thanks very much for reporting this. This is indeed an error in how ABAP cleaner handles MODULE ... ENDMODULE sections, will fix asap!

    Kind regards,
    Jörg-Michael

  3. jmgrassau commented on Feb 27, 2024

    @jmgrassau
    Member

    Hi Joachim,

    this will be fixed with the next release. A side-effect of this bug was that ABAP cleaner indented MODULE ... ENDMODULE by 2 spaces, which was also wrong (and differs from PrettyPrinter behavior).

    Kind regards,
    Jörg-Michael

  4. self-assigned this
    on Feb 27, 2024
  5. jmgrassau commented on Feb 27, 2024

    @jmgrassau
    Member

    Hi Joachim,

    thanks again for reporting this bug – this should now be fixed with version 1.13.2, which was just released!

    Kind regards,
    Jörg-Michael

  6. JoachimEck commented on Feb 28, 2024

    @JoachimEck
    Author

    Hello Jörg-Michael,

    that went very quickly again 👍. I am happy if I can help.

    Kind regards,
    Joachim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions