GUIDELINE 6.24
Obsolete and Internal System Fields
ABAP_BACKGROUND
Not all system fields are designed to be used in application programs.
All available system fields can be displayed as components of the
structure SYST in ABAP Dictionary (or as components of the
structure sy in the debugger). The meaning of the components is
included in the accompanying description. Any system fields that are
obsolete or only to be
used internally are clearly marked.
ABAP_RULE
Do not use obsolete or internal system fields
In application programs, do not use system fields flagged as obsolete or
for internal use only in ABAP Dictionary or in the ABAP documentation.
ABAP_DETAILS
The behavior of obsolete and internal system fields is undefined. This
means that ABAP application programs must not make any assumptions about
the content of these system fields.
Bad example
The following source code shows how the system field sy-fodec ,
flagged for internal use, is used illegally in the structure SYST
after the statement DESCRIBE FIELD to count the number of
decimal places in a data object.
DATA dobj TYPE p LENGTH 8 DECIMALS 2.
DATA type TYPE c LENGTH 1.
DATA decimal TYPE i.
DESCRIBE FIELD dobj TYPE type.
decimals = sy-fodec.
Good example
The following source code demonstrates how decimal places can be counted
correctly using the appropriate addition of the statement DESCRIBE
FIELD .
DATA dobj TYPE p LENGTH 8 DECIMALS 2.
DATA type TYPE c LENGTH 1.
DATA decimals TYPE i.
DESCRIBE FIELD dobj TYPE type DECIMALS decimals.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved