05-10-2010 8:59 AM
Hi,
I am getting invalid characters from different system into R/3.IT is showing the invalid character as # or space
I have used this code to replace it with space
TRANSLATE field TO UPPER CASE.
IF field CA '@!#'.
REPLACE '@' WITH space INTO field.
REPLACE '!' WITH '1' INTO field.
REPLACE '#' WITH space INTO FIELD.
CONDENSE FIELD.
ENDIF.
but it is not working because the actuall field is not # or space it is something other than those since the system did not recognis it is showing as such. Some characters are like ά u0161 ų č ù á .
How can i code this . Please suggest
05-10-2010 9:04 AM
This are Eastern European Characters and if your system is Unicode and transfering system is not unicode then this charaters appears with "#".
If you are using Open dataset statement to get data in SAP, then plz check the extension code page for the Open dataset.
If you are using Portal to get data in SAP, then plz check the Portal code page
05-10-2010 9:48 AM
Hi,
For doing this the variable must be C,N,D,T Types.
1) CO
2) CN
3) CA
4) NA
5) CS
6) NS
7) CP
😎 NP .
The above listed are the Comparison Operator. Hope any one of this will solve ur problem
With Regards,
Sumodh.P
Edited by: Sumodh P on May 10, 2010 2:19 PM
Edited by: Sumodh P on May 10, 2010 2:27 PM
05-10-2010 10:33 AM
replace all occurrences of regex '[^[:alnum:]]' with ` `.
or
replace all occurrences of regex '[^[:alnum:]]' with space.
Edited by: Keshav.T on May 10, 2010 3:31 PM
Edited by: Keshav.T on May 10, 2010 3:31 PM
05-10-2010 10:51 AM
@Keshav: I don't think the use of replacing any non \[:alnum:\] characters is the right approach; this depends of course on the requirements, but a simple dash "-" would then also be replaced by a space. Also, your expression should actually read \[^\[:alnum:\]\].
@Ravi: You might want to check if you really want to kill any of those special characters by overwriting them with a space. I personally doubt that this is the right approach. Instead you might want to look at function module SCP_REPLACE_STRANGE_CHARS, e.g. see also this thread . This way you'd at least retain something that's closer to the original text...
Cheers, harald
05-10-2010 11:00 AM