
Processing Fields
Displaying Field Values at Runtime
You can use the Fields display mode in the Debugger to display the contents of program fields. The display can accommodate up to eight fields. This is the default display mode in the Debugger. The following data objects are supported:
- Single fields
- Structured fields
- Strings
- Internal tables
- Objects
With more complex data objects such as references or tables, the contents are not displayed directly in the default display mode. Instead, you have to double-click the field display to call up the appropriate
attribute display.
Procedure
From any display mode in the Debugger, choose Fields.
Enter a field name directly in one of the fields in the display, or select a field by double-clicking its name in the source code display. When you select a field from the source code display, the system automatically enters it in the field display.
Step through the program using one of the execution types. See also
Stepping Through the Source Code.
Example

Displaying Further Fields
The field display can contain up to eight fields, of which only four can be displayed at a time. You can display the other fields by using the scroll buttons.
Displaying System Fields
This display mode allows you to display the contents of any system fields. The three most important system fields SY-SUBRC, SY-TABIX, and SY-DBCNT are always displayed.
Displaying Fields from External Programs
You can also display the contents of fields from external programs if you know the names of these. To do so, enter the program name in parentheses before the field name: fieldname(programname).
Special Types of Field Display
As in the program source code, you can make offset and length entries for character-type fields. If, for example, you enter
sy-datum+4(2
) in the field display, the current month of the system date is displayed under
Field contents.
If you specify an integer in angle brackets after the name of an internal table, the content of the line that corresponds to the integer is output. The entry
itab[4]
, for example, displays the fourth line of the internal table
itab
. If the integer exceeds the number of current table lines, the table will be flagged as unknown.
With data references, the content of the referenced data object is displayed if an arrow and asterisk are appended to the name of the reference.
r->*
displays the content of the field that is referenced by the data reference
r
.
If you double-click a data or object reference under Field contents in the default display mode, all the attributes and field contents of the referenced data object are displayed in the next screen (data references). The attributes and values of the current instance of all referenced classes and interfaces are output under object references.
7<cl>
, for example, displays all the values of the seventh instance from class
cl
.
The headers of strings, internal tables as well as data and object references are displayed if you place an asterisk at the beginning of the name. For example, the header of the internal table
itab
is displayed in hexadecimal format if you enter
*itab
in the field display. The field contains zeros if a table does not have a header.
If you place an ampersand at the beginning of the name, the reference of strings, internal tables as well as data and object references are displayed in hexadecimal format. The entry
&s
tr, for example, displays the reference to the string
str
.
Changing the Display Format
You can display the field contents either formatted for their data type or in hexadecimal format.
Use this button to display the field contents in hexadecimal format.
Use this button to display the field contents in their original output format.
Deleting All Field Names
Use this button to delete all field names from the field display.
Changing Field Values at Runtime
You can change the values of fields at runtime to see how the change would affect the program flow. Suppose you have found out that a field contains an incorrect value. You would be able to replace it with another value in the Debugger to test whether the program would run properly in that case.
You can change the values of the following data objects of your program. If you enter a value with an incompatible type, the system displays an error message.
- Single fields
- Structured fields
- Strings
- Fields of internal tables
- Fields of classes and interfaces
Procedure
To replace the contents of a single field, proceed as follows:
- Choose Fields to open the field display mode.
- Double-click or enter the name of a field in the source code to place it in the field display. The field name and its current value appear in the display.
- Enter a new value for the field.
- Choose the pencil icon (Change field contents) at the end of the field display.

With certain data objects such as structures or internal tables, you first have to double-click the appropriate field name to display the
attributes. You then have to double-click the individual fields again to open the display mode.
Result
The Debugger writes the new value to the program field and the system records the change in the system log. If you do not click the pencil icon, the changed value is ignored.

The Debugger accepts the values exactly as you entered them. You must, therefore, ensure that you use the correct format (upper and lowercase, left-justified entry for hexadecimal numbers).