SAP EVALUATION - Guide
Get Example source ABAP code based on a different SAP table
Evaluation of System Fields
ABAP_BACKGROUND
System fields describe general system states or are set specifically by individual statements. The content of system fields is only defined as described in the documentation of the system fields or in the documentation of ABAP statements that set system fields. In contexts other than those described there, the content of system fields is not defined. Particularly statements whose effects on system fields are undocumented can modify the content of specific system fields, such as the
ABAP_RULE
Evaluate system fields only in contexts for which they are defined. If an ABAP statement sets a system field in accordance with its documentation, the field should be evaluated directly after the statement. You must not evaluate system fields after statements, however, whose effects are undocumented.
ABAP_DETAILS
If possible, a system field should be evaluated directly after the statement that set it, to prevent it from being overwritten by other statements. The bigger the gap between the ABAP statement in question and the evaluation of a system field, the higher the risk that this system field will be affected by a different statement in the meantime.
If necessary, the values of system fields should be saved in helper variables. This applies in particular to the general
You should never evaluate statement-related system fields after statements that do not set these fields according to their documentation. As before, a common example is the evaluation of
Latest notes:
The static methods of the class
ABAP_HINT_END
ABAP_EXAMPLE_BAD
The following source code shows an example where
...
... 'other statements
...
IF sy-subrc = 0.
...
ENDIF.>
ABAP_EXAMPLE_END
ABAP_EXAMPLE_GOOD
The following source code corrects the above example by assigning
find_subrc = sy-subrc.
...
... 'other statements
...
IF find_subrc = 0.
...
ENDIF.>
ABAP_EXAMPLE_END