Show TOC

Renaming Elements in All Includes of an ABAP ProgramLocate this document in the navigation structure

Context

You can use this function to rename elements in all parts of the ABAP source code.

Procedure

  1. In the source code editor, position the cursor on the element to be renamed. ADT marks the element.
    Highlighted positions where an element is renamed
    Figure 1: Highlighted positions where an element is renamed

    It also marks all other occurrences of the element in the source unit that you are editing. You can scroll or use Ctrl K to find other occurrences quickly.

  2. Start the Start of the navigation path Source Code Next navigation step Rename (Alt Shift R) End of the navigation path from the context menu of the element to be renamed). Or use the Quick Fix menu: Ctrl 1 and then Rename...
  3. In the dialog box that follows, enter the new name for the element and choose Next.
    Note You can also choose Finish to complete the renaming right away.
    Input field to enter the new element name
    Figure 2: Input field to enter the new element name
  4. The Rename function shows you the changes that will be made. Use the navigation buttons to step through the changes.
    Changes highlighted in a compare window
    Figure 3: Changes highlighted in a compare window
  5. Choose Finish to complete the renaming.

Results

The wizard renames the selected element and updates the references.

Display of the renamed elements and updated references
Figure 4: Display of the renamed elements and updated references
Note You can undo the renaming by choosing Undo Rename (Ctrl Z) from the context menu.