What does it do? This statement searches a character string or byte chain dobj> for the substring specified in substring> and replaces the first character string or byte string in dobj> that matches substring> with the content of the data object new>. The memory areas of substring> and new> must not overlap, otherwise the result is undefined. If substring> is an empty string, the position in front of the first character or byte of the search range is found and the content of new> is inserted in front of the first character. If the length of the intermediate result is longer than the length of dobj>, data objects with fixed lengths are truncated on the right. If the length of the intermediate result is shorter than the length of dobj>, data objects of fixed length are padded on the right with blanks or hexadecimal zeros. Data objects of variable length are adjusted accordingly. In character string processing, the trailing blanks are respected for data objects dobj>, substring>, and new> of type c >, d>, n>, or t>. System Fields> sy-subrc>>Meaning> 0The substring in substring> was replaced in the target field dobj> by the content of new>. 4The substring in substring> could not be replaced in the target field dobj> by the content of new>.
Latest notes: This variant of the REPLACE> statement has been replaced by the variant REPLACE>>. NON_V5_HINTS ABAP_HINT_END • IN BYTE MODE REPLACE - obsolete • IN CHARACTER MODE REPLACE - obsolete
ABAP Addition
What does it do? The optional addition IN ${CHARACTER$|BYTE$} MODE> determines whether character string or byte string processing> is performed. If the addition is not specified, character string processing is carried out. Depending on the processing type, the data objects substring>, new>, and dobj> must be character-like or byte-like. • LENGTH REPLACE - obsolete
ABAP Addition
What does it do? If the addition LENGTH> is not specified, all the data objects involved are evaluated in their entire length. If the addition LENGTH> is specified, only the first len> characters or bytes of substring> are used for the search. len> expects a data object of the type i>.
ABAP_EXAMPLE_VX5 After the replacements, text1> contains the complete content I should know that You know>, while text2> has the cut off content I should know that>. ABEXA 00552 ABAP_EXAMPLE_END