Show TOC

Renaming Elements in a Single Source UnitLocate this document in the navigation structure

Context

You can change all occurrences of an element (except ABAP keywords) in an ABAP program at the same time.

Procedure

  1. In the source code editor, position the cursor on the element to be renamed.
  2. Start the Start of the navigation path Edit Next navigation step Quick Fix (Ctrl 1) End of the navigation path Rename function function using the context menu and then Rename x in source unit (Ctrl 2, R)).

A frame appears around each occurrence of the element.

Highlighted position of the element that is edited and all further occurrences of the element
Figure 1: Highlighted position of the element that is edited and all further occurrences of the element

  1. Type in your change. The ADT makes the change simultaneously in all occurrences of the element in the source code unit you are currently working in. This technique is only allowed for named elements that occur only in your current source code unit. For example, you cannot use this technique to rename elements in a method implementation if the named element is also used in your ABAP Unit tests.

Results

You have renamed an element in your source code throughout the source code unit you are currently working in.