Open Koch013 opened 1 year ago
Hi Koch013,
thanks for opening this – yes, this is also on my own wish list!
Things might get tricky in cases like this one:
lt_my_tab = VALUE #( ( col1 = 'ABC' column2 = 'DEFG' column_4 = 'LMN' )
( col1 = '123456' c3 = '13141516171819' column_4 = '2021' ) ).
because without retrieving the DDIC information of this structure, there is no way to determine whether column2
comes before c3
or vice versa. But I hope these would be rare cases.
Kind regards, Jörg-Michael
Hi Jörg-Michael, in such a case I'd suggest to take the first line as reference. And whenever a new field is introduced, place it according to the first line. To make it more precise, I'd place the new field (c3) just before the next already known field (column_4). If no further "already known" field exists, place it to the end.
lt_my_tab = VALUE #( ( col1 = 'ABC' column2 = 'DEFG' column_4 = 'LMN' )
( col1 = '123456' c3 = '13141516171819' column_4 = '2021' )
( col5 = '5' ) ).
would lead to
lt_my_tab = VALUE #( ( col1 = 'ABC' column2 = 'DEFG' column_4 = 'LMN' )
( col1 = '123456' c3 = '13141516171819' column_4 = '2021' )
( col5 = '5' ) ).
Regards, Stefan
It sounds like this approach will require automatic re-ordering of the fields to support all cases, for example to handle this:
lt_my_tab = VALUE #( ( col1 = 'ABC' column2 = 'DEFG' column_4 = 'LMN' )
( col1 = '123456' c3 = '2' column_4 = '2021' )
( col1 = '123456' column_4 = '2022' c3 = '1' ) ).
Hi,
thanks for this great tool!
Maybe the alignment of table rows in a value expression can be enhanced a bit.
If I use abap cleaner on this statement
the result looks like this:
This is a little bit better than the original, but I expected more something like this:
or maybe this:
Is it possible to implement this?
Thanks!