SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Short Reference →
REPLACE - Short Reference
Syntax
REPLACE { { [{FIRST OCCURRENCE}|{ALL OCCURRENCES OF}]
{[SUBSTRING] substring} | {REGEX regex} IN
{ {[SECTION [OFFSET off] [LENGTH len] OF] dobj}
| {TABLE itab [FROM lin1 [OFFSET off1]]
[TO lin2 [OFFSET off2]]} }
WITH new
[IN {CHARACTER|BYTE} MODE]
[{RESPECTING|IGNORING} CASE]
[REPLACEMENT COUNT rcnt]
{ {[REPLACEMENT OFFSET roff]
[REPLACEMENT LENGTH rlen]
[REPLACEMENT LINE rlen]}
| [RESULTS result_tab|result_wa] } }
| { SECTION [OFFSET off] [LENGTH len] OF dobj
WITH new
[IN {CHARACTER|BYTE} MODE] } }.
Effect
Replaces character- or byte strings in a character- or byte-type data object dobj
or in an internal table itab with the content of new.
Determination of the characters or bytes to be replaced using a search for substrings or regular expressions or by specifying the offset and length directly.
Additions