2025 Feb 11 2:03 PM - edited 2025 Mar 16 4:28 PM
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:
In the first occurrence, it works fine:
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:
It works fine with ADT 3.46 and backend 7.52 SP 04.
Request clarification before answering.
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 }|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.