ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Internal Tables → Processing Statements for Internal Tables → REPLACE IN TABLE itab
REPLACE IN TABLE - options
Other versions: 7.31 | 7.40 | 7.54
Syntax
... [{RESPECTING|IGNORING} CASE]
[REPLACEMENT COUNT rcnt]
{ {[REPLACEMENT LINE rlin]
[REPLACEMENT OFFSET roff]
[REPLACEMENT LENGTH rlen]}
| [RESULTS result_tab|result_wa] } ...
Effect
The addition REPLACEMENT LINE
returns the last row number in which the search
pattern was found using the statement REPLACE
IN TABLE in rlin
. The following can be specified for rlin
:
-
An existing variable that expects the data type
i
. -
An inline declaration
DATA(var)
. The declared variable has the data typei
.
If no replacement is made, rlin
retains its existing value or stays initial.
The remaining additions used for making replacements in individual table rows have the same
meaning as pattern-based replacements made using
REPLACE
in elementary character strings or byte strings.
When the RESULTS
addition is used, the row numbers of each occurrence in
the component LINE of the table row in question in result_tab
or the row number of the last occurrence are saved to result_wa
.