Skip to content
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

Check suggestion - inline FS declaration's scope in loops #1008

Open
ycohen-dev opened this issue Mar 2, 2021 · 1 comment
Open

Check suggestion - inline FS declaration's scope in loops #1008

ycohen-dev opened this issue Mar 2, 2021 · 1 comment

Comments

@ycohen-dev
Copy link

Given that the ABAP compiler doesn't have proper scope checks for inline field symbols defined in:

LOOP AT lt_table ASSIGNING FIELD-SYMBOLS(<ls_line>).   
...
ENDLOOP. 

Meaning that it is valid code to use <ls_line> after ENDLOOP

then I suggest a new check which will alert the user when such occurrences happen.

For example:

LOOP AT lt_table ASSIGNING FIELD-SYMBOLS(<ls_line>).   
...
ENDLOOP.

WRITE <ls_line>.
@larshp
Copy link
Owner

larshp commented Mar 2, 2021

good idea

accessing the compiler information in ABAP is a bit difficult, but instead I might implement this in https://abaplint.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants