10-05-2007 10:58 AM
Hi,
I'm having an error message when the program dumps: Assignment error: Overwriting a protected field.
And it is pointed in this code:
012370 DATA:
012380 up_field(20),
012390 up_xavis LIKE zdtam100-xavis_req.
012400
012410 up_xavis = zdtam100-xavis_req.
012420 CLEAR zdtam100.
012430 zdtam100-xavis_req = up_xavis.
012440 up_field = 'DTAM100-'.
012450 LOOP AT nametab.
012460 CHECK nametab-fieldname NE 'XAVIS_REQ'.
012470 CHECK nametab-fieldname NE 'XCRLF_SUPP'.
012480 CHECK nametab-fieldname NE 'XCHAR_NREP'.
012490 up_field+8 = nametab-fieldname.
012500 ASSIGN (up_field) TO <up_field>.
012510 CLEAR dta_mt100.
012520 dta_mt100-tag = nametab-fieldname.
012530 READ TABLE dta_mt100.
> <up_field> = dta_mt100-value.
012550 ENDLOOP.
Can somebody tell me on what to do?
Help will be rewarded.
Thanks in advance!
10-05-2007 11:03 AM
Hi!
That field is protected in some way. This could be, if it is an IMPORTING parameter of a function call, or a PERFORM.
Or it is a constant maybe.
Regards
Tamá
10-05-2007 11:12 AM
My guess is u are accessing wrong field with help of field symbol. Check using debug what is the value of the field 'DTAM100-xxx' append the xxx part with the actual field name.
10-05-2007 11:23 AM
Hi,
I hope <up_field> is a field-symbol and since because you are trying to assign a value directly you are getting this error.
<up_field> = dta_mt100-value.
05-22-2015 2:48 AM
if your field test "DTAM100-xxx" is part of the key, and if so does not allow you to dynamically assign values or primary key.