cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP ADT code completion/quick fix get lost due to some lines of code above

Sandra_Rossi
Active Contributor
0 Likes
617

Sometimes the ABAP Eclipse ADT code completion (Ctrl + Space) or quick fix (Ctrl+1) get lost.

With the below code, I obtain this crazy code completion proposal after the text "cl_abap_format=>" of the last line:

Sandra_Rossi_0-1739282304773.png

In the first occurrence, it works fine:

Sandra_Rossi_1-1739282420066.png

Code to reproduce:

 

REPORT z_reproduce_bug.
" code completion after cl_abap_format=> is wrong in the last line
DATA(v1) = escape( val    = sy-abcde
                   format = cl_abap_format=>e_string_tpl ).
DATA(v2) = |\n|.
DATA(v3) = escape( val    = sy-abcde
                   format = cl_abap_format=>e_string_tpl ).

 

No fix found in SAP notes.

System to reproduce the bug:

  • ADT 3.46
  • ABAP backend 7.40 SP 23

It works fine with ADT 3.46 and backend 7.52 SP 04.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

After some tests, I realize that the backend ABAP parser goes wrong if any line above contains one of any of these String Template wildcard characters:

 

|\n|

|\r|

|\{|

|\||

 

No issue with |\t| and |\\|.

If you get crazy with that bug, you may simply replace them respectively with:

 

|{ cl_abap_char_utilities=>newline }|

|{ cl_abap_char_utilities=>cr_lf(1) }|

|{ '{' }|

|{ '|' }|

 

|\r\n| may be replaced with:

|{ cl_abap_char_utilities=>cr_lf }|

 

Answers (0)