abap-cleaner icon indicating copy to clipboard operation
abap-cleaner copied to clipboard

CORRESPONDING ... EXCEPT and LOOP AT ... GROUP BY indentation

Open vonglan opened this issue 1 year ago • 6 comments

Hi Jörg-Michael,

it seems these do not work as expected (or maybe something is wrong with my ADT/installation?):

      APPEND CORRESPONDING #( group->*
                      EXCEPT mode_response_time_secs
                        mode_response_time_percentage ) TO it_agg REFERENCE INTO DATA(wa_agg). 

and

    LOOP AT it REFERENCE INTO DATA(group)
         GROUP BY ( syst = group->syst
                        begin_date = group->date_in_system_tz
                    instance = group->instance
                        tcode = group->tcode
                    progname = group->progname
                    task_type = group->task_type
                      screen_nr = group->screen_nr
                    jobname = group->jobname ). 

In both cases, I would expect the field names to be aligned.

Best regards, Edo

vonglan avatar Jun 24 '24 12:06 vonglan

Hi Edo,

excellent, those cases are indeed not yet considered, thanks a lot!

Kind regards, Jörg-Michael

jmgrassau avatar Jun 26 '24 09:06 jmgrassau

if you want to do that, here is another:

      SPLIT line->* AT ';' INTO wak-pgmid
                              wak-object
                                wak-objname
                                wak-mastertype.

vonglan avatar Jul 01 '24 10:07 vonglan

and it seems there is another:

          APPEND CORRESPONDING #( key->*
                                  MAPPING obj_type = object
                                  obj_name = objname ) TO object-keys.

vonglan avatar Jul 01 '24 10:07 vonglan

and I would like to see INIT ... FOR ... NEXT aligned:

      e_leftover_qty = REDUCE #( INIT q = 0
                                      FOR <dlv> IN i_dlvs
                                   NEXT q += <dlv>-qty ).

vonglan avatar Jul 02 '24 06:07 vonglan

REDUCE is already covered by this issue: https://github.com/SAP/abap-cleaner/issues/107 😉

ConjuringCoffee avatar Jul 02 '24 07:07 ConjuringCoffee

Hi Edo,

for a start, alignment of LOOP AT ... GROUP BY ( ... ) is now supported in version 1.18.0, which was just released:

image

Kind regards, Jörg-Michael

jmgrassau avatar Jul 08 '24 10:07 jmgrassau