Line of a sorted or hashed table passed to CHANGING
changing_sorted_line
Description
A field symbol on a whole line of a sorted or hashed table, passed to a CHANGING parameter of a method
Extended Information
The key fields of a sorted or hashed table line are write-protected, so the line as a whole is
write-protected. Binding it to a CHANGING parameter activates, but the call fails at runtime with
CX_SY_DYN_CALL_ILLEGAL_TYPE, "the actual parameter for ... is write-protected", even when the method does not
change the key.
Only field symbols assigned in the same method, form or function module are checked, via READ TABLE ... ASSIGNING,
LOOP AT ... ASSIGNING, INSERT ... INTO TABLE ... ASSIGNING and ASSIGN itab[ ... ] TO.
Fix: read the line into a work area, pass the work area and MODIFY TABLE ... FROM it afterwards,
or pass only the non-key fields the method needs.