10-22-2008 6:47 AM
Hi ,
I want to replace # symbol .
like my text SSS113 200MM# -SL
I need to replace it SSS113 200MM -SL( remove the # symbol )
I have written the below code in Development server . it is working fine. however , it is not working in Quality server .
IF p_text IS NOT INITIAL.
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 '-'.
ENDIF.
when i check in debugging mode , if i change the value in debugging mode manully , it is replacing the # value . after that i changed the code below .
after also , got same problem , working in Developement server . not working in quality server.
Data: l_special_chars TYPE CHAR50 value '#'.
IF p_text is not initial.
translate p_text using l_special_chars.
ENDIF.
Pls.help me.
Regards ,
Kiran
10-22-2008 6:51 AM
Hello,
You can try with this statement i will work fine.
REPLACE '#' WITH '-' INTO Your field.
CONDENSE field NO-GAPS.
It will work fine.
10-22-2008 7:01 AM
Thanks Santosh for your time .
i tried that also . it is working fine in Development server . But in quality server , sy-subrc value 2 , it is giving . even i removed sy-subrc check also , that also not working in Quality server .
Pls.help me
Regards ,
Kiran.