Skip to Content
Author's profile photo Wolfgang Woehrle

Renaming Elements in All Includes of an ABAP Program

In SAP NetWeaver 7.31 SP6 and higher, you can rename elements in a single source unit as well as global ABAP classes, interfaces, or their members (such as fields or methods of classes or interfaces) that are used globally in other programs.

Procedure

  1. In the source code editor of your ABAP program, put the cursor on the element to be renamed.
    Refactoring_Intelligent_Search_and_Rename_Mark_Variable.png
    All occurrences of the variable are highlighted
  2. In the context menu, select Source > Rename or choose the shortcut Ctrl + 1 and select Rename x.
  3. In the following dialog box, enter the New Name that has to be renamed and click Next.
    Refactoring_Intelligent_Search_and_Rename_Choose_Name.png
  4. The following dialog box displays the ABAP programs and transport request where the element is used and changed. Select Next or Finish to continue.
  5. In the Rename: Field window, the changes are displayed in the Refactored Source frame. Check the changes step-by-step by using the navigation buttons.
    Refactoring_Intelligent_Search_and_Rename_Change_Display.png
  6. Select Finish to complete the renaming.

Result

The source code editor renames the selected element and updates the references.

Refactoring_Intelligent_Search_and_Rename_Results.png

NOTE

You can undo the renaming by choosing Undo Rename (Ctrl + Z) from the context menu.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Dejan Vukosavljevic
      Dejan Vukosavljevic

      This is only in Eclipse, right?