SAP SYST FIELD ACCESS - Guide
Get Example source ABAP code based on a different SAP table
Access to System Fields
ABAP_BACKGROUND
The system fields are supplied with values by the ABAP runtime framework. In a program, however, they behave like normal variables. You can assign values to these fields using the ABAP program. This is because both the ABAP kernel and the ABAP components of the ABAP runtime framework have can perform writes on system fields.
ABAP_RULE
In application programs, only perform reads on system fields and never perform writes.
ABAP_DETAILS
The values of system fields are usually vital for correct program execution. This means performing writes on system fields carries a lot of risk. Write operations in system fields can lead to a loss of important information, which can prevent programs from running correctly. Therefore, you cannot overwrite system fields to change the execution of the program or use the fields to replace explicitly defined variables.
In addition, you cannot misuse system fields as implicit output parameters of procedures, irrespective of whether the fields have been explicitly set within the procedure (due to an illegal write or as the result of an executed statement).
Exception
The only system fields where it was allowed to change the field content (in an application program) are part of classic list processing. This should
ABAP_EXAMPLE_BAD
The following source code shows a write performed on the system field
CALL FUNCTION ...
...
EXCEPTIONS ...
CASE sy-subrc.
...>
ABAP_EXAMPLE_END
ABAP_EXAMPLE_GOOD
The source code below omits the write shown above.
...
EXCEPTIONS ...
CASE sy-subrc.
...>
ABAP_EXAMPLE_END