Skip to Content
0
Former Member
Aug 16, 2006 at 09:38 AM

Routine help : How to get rid of "#" ?

45 Views

Hello,

I know this issue has already been discudded many times here, but I'm still having problem with invalid caracter "#". We are loading Plant Maintenance Orders every morning and the data load failed repeatedly due to the presence of a "#" character in the text line (fied C_TEXT = Slopklep gaat constant open en dicht#).

We've found that the "#" character is in fact interpreted by default, the corresponding hexadecimal code is "09".

We were unable to convince the R/3 team to correct the error on their side, therefore i tried to write the following abap routine :

Unfortunatly, I'm not really a great abaper , as you can see, and instead of beig corrected, the field is deleted.

Could you help me to write this routine ?

data : hex_char type X value '09',

hex_sp type X value ' ',

hex_text type Xstring ,

car_text like COMM_STRUCTURE-/BIC/C_TEXT.

move COMM_STRUCTURE-/BIC/C_TEXT to hex_text.

replace all occurrences of hex_char in hex_text

with hex_sp in byte mode.

move hex_text to car_text.

  • result value of the routine

RESULT = car_text .

Any help would be greatly appreciated.

Best Regards.