-
Notifications
You must be signed in to change notification settings - Fork 53
"Align parameters and components" when using multiple indices in nested table expression #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi ConjuringCoffee, yes, that second example definitely doesn't look good (although in a way it's not wrong). On the other hand, if you had a variable name here such as ```[ lv_index ]``, it could have any length between 1 and 30 chars, and at some point you'd want a line break. So, let's see what can be done about it – maybe it should simply be prevented to introduce line breaks when the content is very short. What I'd consider a bug is the last example, because if ABAP cleaner moves Kind regards, |
Hi ConjuringCoffee, thanks again for opening this issue – this was indeed a bug, because table expressions that are chained with DATA(this_is_a_very_very_long__name) = NEW lcl_example( )->this_is_a_very_very_long_name(
table_normal[ 1 ] ).
DATA(this_is_a_very_very_long_name2) = NEW lcl_example( )->this_is_a_very_very_long_name(
table_nested[ 1 ][ 1 ] ). Condensing also works now (without keeping unnecessary line breaks), so if you enter … any_method(
lt_any_table[
1 ][
2 ][
3 ] ).
any_method(
par1 = lt_any_table[
1 ]
param2 = lt_any_table[
1 ][
2 ]
parameter3 = lt_any_table[
1 ][
2 ][
3 ] ). you will get: any_method( lt_any_table[ 1 ][ 2 ][ 3 ] ).
any_method( par1 = lt_any_table[ 1 ]
param2 = lt_any_table[ 1 ][ 2 ]
parameter3 = lt_any_table[ 1 ][ 2 ][ 3 ] ). And an example where a line break cannot be avoided … DATA(lv_some_value_with_a_long_name) = any_method(
lt_any_table[
lv_index ][
lv_second_index ][
lv_third_index_with_long_name ] ). … will look like this: DATA(lv_some_value_with_a_long_name) = any_method( lt_any_table[ lv_index ][ lv_second_index ][
lv_third_index_with_long_name ] ). Kind regards, |
Great, thank you! |
Hi ConjuringCoffee, this issue should now be fixed with version 1.5.1! Kind regards, |
Hi Jörg-Michael, I found an example in which I don't like how alignment looks when working with multiple indices in a table expression with a nested table. Any chance you can improve this? 😊
Take the following full example:
I'm not really happy with the indentation of the table expression. This is the result after ABAP Cleaner was executed:
The first example is alright, but I don't like the second example. I'd have expected something like this:
If I tried to manually indent it like that though, then this would be the result:
Here are the settings I use:

The text was updated successfully, but these errors were encountered: