Code: Alles auswählen.
Loop at tabelle into wa_tabelle.
wa_tabelle-alt = ersetz.
modify tabelle from wa_tabelle.
endloop.
Code: Alles auswählen.
DATA: text1 TYPE string,
text2(18) TYPE c,
cnt TYPE i,
off TYPE i,
len TYPE i.
text1 = text2 = 'I know you know'.
REPLACE ALL OCCURRENCES OF 'know' IN:
text1 WITH 'should know that'
REPLACEMENT COUNT cnt
REPLACEMENT OFFSET off
REPLACEMENT LENGTH len,
text2 WITH 'should know that'
REPLACEMENT COUNT cnt
REPLACEMENT OFFSET off
REPLACEMENT LENGTH len.
Code: Alles auswählen.
PARAMETERS: Alt(10) TYPE c,
Ersetz(10) TYPE c.
DATA: BEGIN OF Tabelle OCCURS 0,
Text(200) TYPE c,
END OF Tabelle,
wa_Tabelle LIKE LINE OF Tabelle.
Code: Alles auswählen.
old = Alt.
new = Ersetz.
REPLACE old WITH new INTO wa_Tabelle.
Write: / wa_Tabelle.
Code: Alles auswählen.
parameters: alt type text10,
new type text10.
data: text(400) type c value 'Hallo Heino, altes Haus'.
data: old(10) type c,
neu(10) type c.
write: / text.
old = alt.
neu = new.
REPLACE ALL OCCURRENCES OF old IN:
text WITH neu.
write: / text.