-
Notifications
You must be signed in to change notification settings - Fork 48
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
Syntax error in SELECT Statement #251
Comments
Hi Joachim, thank you for reporting this! Unfortunately, I can't reproduce this error yet, maybe because it depends on a certain rule configuration. Could you please attach the profile with which this error comes up? (menu "Help / Open Profiles Folder…", then attach .cfj file with the profile name).
It's definitely ABAP cleaner: If the syntax is correct, ABAP cleaner should be able to deal with it! (Well, apart from a few exceptions like macros with incomplete code blocks, or chain colons inside parentheses, but those provoke specific "unsupported" messages). Kind regards, |
Hey Jörg-Michael, Kind regards, |
Hi Joachim, hm, unfortunately, I still can't reproduce the issue, even with the profile. You are using the current release 1.13.1 (menu "Help / About"), right? Does the error log (menu "Help / Open Error Log") contain any more details? Maybe this issue depends on the context, too. In that case, unfortunately, I'd have to ask for some more work on your end… Could you please:
Kind regards, |
Hi Joachim, ah, great, now I get the error message, too! Thanks for your help, let's see what causes this issue! Kind regards, |
Hi Joachim, oh, this is too bad! It's the "Align SELECT lists" rule, which tries to keep the maximum line length of 100. So, an even shorter example (no context needed) would be: SELECT f1, f2, f3
FROM any_dtab
INTO ( @DATA(lv_var_1_with_long_name), @DATA(lv_var_2_with_very_long_name), @DATA(lv_var_3_with_long_name) ).
ENDSELECT. which is changed to SELECT f1, f2, f3
FROM any_dtab
INTO ( @DATA(lv_var_1_with_long_name), @DATA(lv_var_2_with_very_long_name), @DATA(
lv_var_3_with_long_name) ).
ENDSELECT. Kind regards, |
Hi Jörg-Michael, sorry, i dont get it yet. I've changed the MODULE to an IF-clause. The Error is still there. I understand that it is also because he has to indent in so far. In your example, I don't understand why ABAP Cleaner indents the third varible like this. If I separate the variable from the DATA in my code, I can no longer activate the programme and I get an error. The line length from the profile is counted from the beginning of the line, isn't it? For me to understand, is the behaviour so desired and would I need to adjust my profile or are you doing some "magic" ;)? Kind regards |
Hi Joachim, sorry for the confusion: My example was just demonstrating the bug: ABAP cleaner tries to limit the line length to 100 in the INTO clause (as configured in the profile), but it introduces a syntax error by breaking the line after Kind regards, |
Hi Jörg-Michael, got it! Thanks! Kind regards, |
Hi Jörg-Michael, that was quick! Kind regards, |
Hi Joachim, thanks again for reporting this and for your help in narrowing down the issue! This bug should now be resolved with version 1.13.2, which was just released. Kind regards, |
Hello ,
I just wanted to use the ABAP Cleaner in a programme again. Unfortunately I get an error after a change and the ABAP Cleaner terminates.
At this line the statement is:
SELECT aufnr, lead_aufnr, objnr, plnbez, stlbez FROM caufv INTO ( @DATA(lv_aufnr), @DATA(lv_lead), @DATA(lv_objnr), @<ls_auftrag>-matnr, @DATA(lv_stlbez) ) WHERE aufnr = @<ls_auftrag>-aufnr AND werks = @s_werks AND loekz = @space.
Perhaps it is due to the declarations within the SELECT, but the programme can be activated.
Can you tell me if it is me or the ABAP Cleaner?
Many thanks
Joachim
The text was updated successfully, but these errors were encountered: