Skip to content

Bad result of Align SORT command ( stand alone cleaner in WINDOWS) #141

Closed

Description

@TMNielsenApS

Before cleaner :

           SORT: gt_vbep_before BY vbeln posnr edatu,
                 gt_vbep_after  BY edatu.

After cleraner:

           SORT: gt_vbep_before BY vbeln
                                   posnr
                                   edatu,
                                   gt_vbep_after  BY
                                   edatu.

Activity

  1. jmgrassau commented on Oct 12, 2023

    @jmgrassau
    Member

    Hi Thomas,

    thanks a lot for this example! You're right, of course – I shall look into this! I guess the expected result would be

               SORT: gt_vbep_before BY vbeln
                                       posnr
                                       edatu,
                     gt_vbep_after  BY edatu.

    so all components are aligned, even if the table names have different length.

    Kind regards,
    Jörg-Michael

  2. TMNielsenApS commented on Oct 12, 2023

    @TMNielsenApS
    Author

    Hi Jörg-Michael

    Yes that would be the result I prefere, but I am no clean-code expert.

    I think maybe other people would prefere this result:

               SORT gt_vbep_before BY vbeln posnr edatu.
               SORT gt_vbep_after  BY edatu.
    
    

    Regards Thomas

  3. TMNielsenApS commented on Oct 12, 2023

    @TMNielsenApS
    Author

    naa - I ment this result:

               SORT gt_vbep_before BY vbeln 
                                      posnr 
                                      edatu.
               SORT gt_vbep_after  BY edatu.
    
    
  4. self-assigned this
    on Oct 16, 2023
  5. jmgrassau commented on Oct 16, 2023

    @jmgrassau
    Member

    Hi Thomas,

    I now enhanced this cleanup rule to consider SORT: chains as well:

    image

    Note that still only the component lists are aligned, keeping the BY keywords where they are – aligned or unaligned – because with the additions STABLE, ASCENDING/DESCENDING, AS TEXT after the table name, aligning "BY" might create huge gaps:

    image

    To align everything, we'd need more options to configure what that should look like.

    Kind regards,
    Jörg-Michael

  6. jmgrassau commented on Oct 16, 2023

    @jmgrassau
    Member

    Hi Thomas,

    thanks again for reporting this bug – this should now be fixed in version 1.7.2, which was just released.

    Kind regards,
    Jörg-Michael

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