Dumps in internal table due to modify/delete
– OBJECTS_NOT_NUMLIKE or
– TABLE_ILLEGAL_STATEMENT.
The table was declared normally like TYPE TABLE OF <dictionary-structure>.
I tried in a loop at a little (standard-)table to read the bigger standard table with a key:
READ TABLE itab INTO wa
WITH KEY …
to get the specific entry into the wa to delete or to modify it.
This is regulary creating a dump because the MODIFY or DELETE statement uses the complete line of the standard table as a key.
types: BEGIN OF ty_selected_line.
INCLUDE TYPE <ddic-structure>.
TYPES END OF ty_selected_line .
types:
tt_selected_tab TYPE SORTED TABLE OF ty_selected_line
WITH UNIQUE KEY primary_key
COMPONENTS
bukrs
field2
DELETE lt_selected_tab USING KEY primary_key
WHERE
bukrs = <fs>–bukrs AND
field2 = <fs>–field2.
|
|
For the OBJECTS_NOT_NUMLIKE dump, a frequent error is to use DELETE itab FROM wa, which is an error because the only syntax SAP knows is DELETE itab FROM tabindex, where tabindex must be an integer to delete all lines from this row number. So it attemps converting wa into an integer which often leads to the dump.
To delete a line based on field values wa, we must use DELETE TABLE itab FROM wa.