2008 Apr 23 4:37 PM
Hi all,
I am getting subrc= 4 when executing following replace statement.
wa-tdline = '####'.
REPLACE ALL OCCURRENCES OF '#' IN wa-tdline WITH space.
what will be the reason?
Regards,
SVS
Hi all,
I am getting subrc= 4 when executing following replace statement.
wa-tdline = '####'.
REPLACE ALL OCCURRENCES OF '#' IN wa-tdline WITH space.
what will be the reason?
Regards,
SVS
2008 Apr 23 4:40 PM
sy-subrc Meaning
0 The specified section or subsequence was replaced by the content of new and the result is available in full in dobj.
2 The specified section or subsequence was replaced in dobj by the contents of new and the result of the replacement was cut off to the right.
*4 The subsequence in sub_string was not found in dobj in the template-based search.*
8 The data objects sub_string or new contain double-byte characters that cannot be interpreted.
This explains.
It might be '####'. is a Tab. So you might have to use the CL_ABAP_CHAR_UTILITIES class.
It can be any of these.
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB
CL_ABAP_CHAR_UTILITIES=>NEWLINE
CL_ABAP_CHAR_UTILITIES=>CR_LF
CL_ABAP_CHAR_UTILITIES=>FORM_FEED
CL_ABAP_CHAR_UTILITIES=>BACKSPACE
A