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

Alignment of table key components

Open Koch013 opened this issue 1 year ago • 1 comments

Hi,

I was a bit surprised that in a table type definition the keyword "KEY" and the components don't get aligned:

 TYPES: BEGIN OF my_type,
             stlnr           TYPE stnum,
             stlkn           TYPE stlkn,
             stpoz           TYPE cim_count,
           END OF my_type,

           my_table_type TYPE 
           STANDARD TABLE OF my_type WITH NON-UNIQUE 
           KEY PRIMARY_KEY COMPONENTS
           stlnr
stlkn.

Cleaning result:

TYPES: BEGIN OF my_type,
         stlnr TYPE stnum,
         stlkn TYPE stlkn,
         stpoz TYPE cim_count,
       END OF my_type,

       my_table_type TYPE STANDARD TABLE OF my_type WITH NON-UNIQUE
       KEY primary_key COMPONENTS
       stlnr
stlkn.

Thanks.

Koch013 avatar Oct 17 '24 12:10 Koch013

Hi Koch013,

you're right, this is indeed not yet covered by any rule!

Kind regards, Jörg-Michael

jmgrassau avatar Nov 09 '24 09:11 jmgrassau