Skip to Content
0
Former Member
Oct 22, 2008 at 05:47 AM

Replace #

18 Views

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