Show TOC

Finding and Replacing Local Source CodeLocate this document in the navigation structure

Use

You use this procedure in the source code editor to quickly find and replace every occurrence of a single word or a string in the source code.

Finding Text

Procedure

  1. From the context menu in the ABAP Editor, choose Find/Replace.
  2. In the Find field, enter the text that you want to search for.
  3. Select any other options you need:
    1. You can search for whole words only.
    2. You can make your search case-sensitive.
    3. You can set the direction of the search to Up or Down.
  4. Choose Find Next or Find All.

    If the string exists in the text, the system positions the cursor on it.

If your program is in display mode you can use only the Find function. You have to be in edit mode to use the Replace function.

Replacing Text

Procedure

  1. From the context menu in the ABAP Editor, choose Find/Replace.
  2. Enter the string for which you want to search, the replacement string and set the relevant options. 
  3. Choose Replace all, or Find next followed by Replace.If the search string exists in the source code, it is replaced by the replacement string. If you choose Replace all, all instances of the search string are replaced in a single step.
  4. If you want to delete all occurrences of a string, leave the Replace field blank and choose Replace All.