ABAP Keyword Documentation → ABAP Programming Guidelines → Robust ABAP → System Fields
Using System Fields on the User Interface
Other versions: 7.31 | 7.40 | 7.54
Background
As system fields are defined using the syst
structure in ABAP Dictionary, you can technically use them to define input fields in dynpros/in Web Dynpro.
Rule
Do not use system fields on the user interface
Never use system field types to define input or output fields for dynpros or selection screens in application programs.
Details
This rule is derived from the SoC rule and the use of data types rule. System fields are purely technical. Their semantic properties, are defined in the ABAP Dictionary (documentation and other texts), do not allow meaningful use in the user dialogs of application programs.
Note
Similarly, you can apply the rule only use semantically appropriate data types to the use of SYST structure components (for typing interface parameters of procedures). The semantic meaning of a system field (expressed in the short text) does not generally match the meaning of the parameter.
Example
When the program PGL_SYSTEM_FIELD_ON_UI is executed, input fields for document
output language are displayed on a classical dynpro. The first input field is declared with reference
to data type syst-langu
of system field sy-langu
.
The second input field is declared with reference to a semantically suitable ABAP Dictionary data type.
The displayed F1 help clearly indicates that syst-langu
is not suited for language fields in a user dialog. This is because the help only describes the behavior
of the sy-langu
field in a program. It does not describe the meaning of the language field in the relevant application.