Skip to content

Error in FOR GROUPS if it contains Keyword #568

Closed

Description

@abapstudent

Hi,

The following code compiles and works ok, but ABAP cleaner display an error.

It is because of the variable name DIV

Is this as designed or a problem?

Thank you.

FINAL(lt_customer_lookup) = VALUE lty_customers_tab( FOR GROUPS cust_grp OF <fs_cust> IN gt_gl_data
                                                     GROUP BY
                                                     ( cust  = <fs_cust>-Customer
                                                       sorg  = <fs_cust>-SalesOrganization
                                                       dc    = <fs_cust>-DistributionChannel
                                                       div  = <fs_cust>-OrganizationDivision )
                                                     ( kunnr = cust_grp-cust
                                                       vkorg = cust_grp-sorg
                                                       vtweg = cust_grp-dc
                                                       spart = cust_grp-div ) ).
Image

Activity

  1. jmgrassau commented on Aug 28, 2026

    @jmgrassau
    Member

    Hi abapstudent,

    very nice bug, thanks for reporting this! This was thrown by the cleanup rule "Use consistent set of comparison operators" with the option "Preferred set of comparison operators = textual". Or actually, it came up because ABAP cleaner indeed mistook DIV for a binary operator that performs a calculation on the previous variable, as in:

    Image

    Anyway, it should be fixed with the next release!

    Kind regards,
    Jörg-Michael

    P.S.: In general, ABAP cleaner should always accept code that compiles without errors – apart from code with macros, which would make ABAP cleaner's job too complicated (or impossible).

  2. self-assigned this
    on Aug 28, 2026
  3. jmgrassau commented on Oct 30, 2026

    @jmgrassau
    Member

    Hi abapstudent,

    thanks again for opening this issue – this bug should now be fixed with version 1.29.2, which was released today!

    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