Removing in # symbol in text .
Hi experts ,
This is the code in develpment server to remove # symbol in the purchase order text
SPLIT p_text AT c_# INTO l_text l_text1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN l_text WITH ' '.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN l_text1 WITH ' '.
CONCATENATE l_text l_text1 INTO p_text SEPARATED BY ' '.
It is working fine in Development server , however , it is not working in PRODUCTION SERVER.
before writing the above code , i tried the code below .
REPLACE ' # ' WITH ' ' INTO p_text.
Even it is also not working in production server .
could you please tel me any alternative other than REPLACE AND SPLIT commands .
Pls.help in this regard .
'#' will come in your text is you press 'Enter' in the text editor. This is special character for 'Enter' . You can not remove it using 'REPLACE'.
Use FM 'CONVERT_STREAM_TO_ITF_TEXT' to remove special characters.
DATA: gt_text TYPE TABLE OF tline WITH HEADER LINE,
gt_stream TYPE TABLE OF char255 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
language = sy-langu
itf_text = gt_text
text_stream = gt_stream.
gt_text is your output table without any special character.
gt_stream is input stream with special character