Start of Content Area

Function documentationREPLACE_ALL  Locate the document in its SAP Library structure

Use

This method allows you to replace found text.

Windows

HTML

Java

ü

X

ü

Features

call method textedit- >replace_all

  exporting
    case_sensitive_mode = case_sensitive_mode
    replace_string = replace_string
    search_string = search_string
    whole_word_mode = whole_word_mode

  changing
    counter = counter

  exceptions
    error_cntl_call_method = 1
    invalid_parameter = 2.

Parameters

Description

Possible values

case_sensitive_mode

Upper-/lowercase

false
Do not observe (default value)

true
Observe

replace_string

Text to replace the occurrences of SEARCH_STRING

 

search_string

Text to be replaced

 

whole_word_mode

Only replace whole words

false
Find whole words and parts of words (default value)

true
Only find whole words

counter

Return value specifying how many times the search string was replaced

 

NoteIf you do not set the parameters SEARCH_STRING and REPLACE_STRING, the Find and Replace dialog box appears.

The method starts at the cursor position and searches to the end of the text. You can use the methods SET_SELECTION_INDEXES, SET_SELECTION_POS, or SET_SELECTION_POS_IN_LINE to set the cursor position. If you want to replace all occurrences within a text, you should set the selection to the first character in the text.

NoteText replacement is not restricted to the selected area.