You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/checks/sub-assign-read-table.md
+2-9Lines changed: 2 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,22 @@
1
-
# code pal for ABAP
2
-
3
1
[code pal for ABAP](../../README.md) > [Documentation](../check_documentation.md) > [READ TABLE with Subsequent Memory Assignment Check](sub-assign-read-table.md)
4
2
5
3
## READ TABLE with Subsequent Memory Assignment Check
6
4
7
5
### What is the Intent of the Check?
8
6
9
-
The "READ TABLE with Subsequent Memory Assignment" Check aims to prevent undesired changes to internal tables using field symbols in context of the `READ TABLE` statement with `INTO` instead of `ASSIGNING`.
7
+
This check aims to prevent undesired changes to internal tables using field symbols in context of the `READ TABLE` statement with `INTO` instead of `ASSIGNING`.
10
8
11
9
### How does the check work?
12
10
13
11
This check finds `READ TABLE` statements which use statement `INTO` for assignment but using a field symbol instead of a variable.
Use `ASSIGNING` instead of `INTO` in combination with field symbols as otherwise the selected table row will be overwritten.
22
16
23
17
### What to do in case of exception?
24
18
25
-
You can suppress Code Inspector findings generated by this check using the pseudo comment `"#EC SUB_ASSIGN`.
26
-
The pseudo comment must be placed after the closing dot of the `READ TABLE` statement.
19
+
In exceptional cases, you can suppress this finding by using the pseudo comment `"#EC SUB_ASSIGN` which should be placed after the closing dot of the `READ TABLE` statement:
27
20
28
21
```abap
29
22
READ TABLE itab ASSIGNING FIELD-SYMBOL(<fs>) WHERE key = '1'.
0 commit comments