Entering content frameProcedure documentation Processing Internal Tables Locate the document in its SAP Library structure

 

Displaying Internal Tables

You can display and change the contents of internal tables (including nested tables) at runtime in the Debugger. The Debugger also provides information about the table type, table key, and the amount of memory it requires.

Procedure

  1. Choose Table from any display mode in the Debugger. The table display appears.
  2. Enter the name of an internal table in the Internal table field, or select a table by double-clicking its name in the source code.
  3. Choose ENTER.
  4. Step through the program using one of the execution types.

Example

This graphic is explained in the accompanying text

Header Line

This graphic is explained in the accompanying text If the internal table has a header line, it is indicated by this icon. If you double-click the icon, the system opens the Structured field display. This contains the names of the components, their current values, and the technical data of the table.

Scrolling Vertically

The table lines are numbered. The first column of the header is ready for input. Here you can enter the first displayed line of the table and scroll line-by-line. You can also scroll using the scroll icons in the standard toolbar.

Scrolling Horizontally

This graphic is explained in the accompanying text You can use the scroll buttons to scroll through the table horizontally. If the table is too wide for all of it to be displayed, use the scroll keys, or move the column headers.

Moving Column Headers

You can change the order in which fields are displayed in the internal table display. To do so, overwrite the text in the field name list with the field names in the order in which you want them to appear. To remove a field from the display, delete its field name from the header. If you enter the name incorrectly, the system displays a sequence of question marks. If there is not enough room to display the entire field, the system shortens the field and displays the "<" character to inform you.

Shifting a Column to the Left

If you double-click a column heading, the table display shifts to the left. None of the columns to the left of the selected column heading are then visible. However, you can restore them to the display by scrolling horizontally.

Specifying a Table Type

Next to the table name, the Type field contains the table type. This may be standard, hashed, or sorted.

Changing the Display Format

As with the field display, you can change the display format in the internal table display mode. The Format field usually contains the value E (for display in columns with relevant formatting). However, it can also take the value X (hexadecimal display), or C (character display).

Resizing the Table Extract

This graphic is explained in the accompanying text Click this button to increase the size of the table extract that is displayed. Three lines of ABAP source code are displayed, and the rest of the screen is used to display lines of the internal table.

This graphic is explained in the accompanying text Click this button to reduce the table display to five lines. The rest of the screen is used to display the ABAP program code.

Displaying Memory Use

To find out how much memory internal tables occupy, choose Goto ® Display Condition ® Memory Usage. Choose Change Settings to display a window, in which you can choose the Internal Tables button.

 

 

 

 

Changing Internal Tables

You can change the contents of internal tables in the Debugger at runtime. You can delete, edit, or add table lines.

Deleting Lines

To delete a line from an internal table:

  1. Open the internal table display mode.
  2. In the Internal table field, enter the name of the table.
  3. Choose ENTER. The system displays the contents of the table.
  4. Position the cursor on the line that you want to delete.
  5. Choose Delete. The line is removed from the table, and the system automatically corrects the line numbering.

Changing Lines

The Change, Insert, and Append functions are field-specific, and can only be used for a single field at a time. Suppose you want to edit the following line:

LH001 FRANKFURT NEW YORK 145400 400 X

First, you have to decide which field you want to edit. Then:

  1. Position the cursor on the relevant field in the line that you want to edit.
  2. Choose Change. The field appears in input mode.
  3. Enter a new value for the field.
  4. Choose ENTER. The system updates the line and displays the changed contents in the table.

Inserting Lines

The Insert and Append functions allow you to add a new line to an internal table. If you choose Append, the new line is added to the end of the table. If you choose Insert, you can add the new line at any position in the table. To insert a new line at the end of the table:

  1. Choose Append.
  2. Enter a value for the first field of the line.
  3. Choose ENTER. The system adds a new line to the end of the table, containing the value that you entered for the first field.
  4. Enter values in the remaining fields as described above.

If you want to add a line in the middle of the internal table, place the cursor on the line after which you want to insert it. Choose Insert, then follow the procedure described above from step 2.

 

 

 

Leaving content frame