Skip to content

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

Open
@ycohen-dev

Description

@ycohen-dev

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>.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions