2007 Sep 25 4:17 PM
Hi, I need to replace de character ' (the character placed below of "?" in the keyboard) in a string.
I use the next code:
REPLACE ALL OCCURRENCES OF ' á' IN:
pvt_desc WITH 'a'.
This code doesnt´t work with the character '. Which is the escape character in ABAP ??
Thanks
2007 Sep 25 4:28 PM
You need a double
'
like''
REPORT zdummy_atg_2.
data: pvt_desc type string.
pvt_desc = ' ''á'.
REPLACE ALL OCCURRENCES OF ' ''á' IN
pvt_desc WITH 'a'.
write: pvt_desc.
Greetings,
Blag.
2007 Sep 25 4:28 PM
You need a double
'
like''
REPORT zdummy_atg_2.
data: pvt_desc type string.
pvt_desc = ' ''á'.
REPLACE ALL OCCURRENCES OF ' ''á' IN
pvt_desc WITH 'a'.
write: pvt_desc.
Greetings,
Blag.
2007 Sep 25 4:28 PM
Please, excuse us if we move this thread to Spanish (I will try to keep an appropiate English translation too, but I bet the explanation in Spanish will not be the same than in English)
Quiero entender que lo que necesitas es eliminar todos los acentos de una cadena. La cosa está muy mal
Primero asegurate el tiro con las mayúsculas, lo tuyo no tiene nada que ver con los códigos de escape (éstos se usan para impresiones).
Lamentablemente, me temo que el ALL OCCURRENCES viene en la 4.7, y mi sistema no llega tan lejos, así que no puedo probar otras cosas... ¿Puedes proporcionarnos un poco más de código? (tipos de las variables y demás)
-
-
Free provided translation:
I will understand you want to drop the "accent" from your string.
Be sure you are checking the caps, nothing related with escape codes (they are related with printing).
Sadly, ALL OCCURRENCES clause appears (I think) in 4.7, and my system is older, I cannot test other things. Can you provide us a bit more of coding? (value types and so)
2007 Sep 25 4:31 PM
Ok Vicenç, I'm going to allowed this one...But next time, all answers only in English please -:)
Greetings,
Blag.
2007 Sep 25 4:57 PM
Sorry...
No, no son los acentos,los acentos los elimino perfectamente con esta sentencia:
REPLACE ALL OCCURRENCES OF 'Á' IN:
pvt_desc WITH 'A'.
Lo que necesito es sustituir las comillas en una cadena.
(Estoy trabajando con la version 6.0)
pvt_desc es de tipo cadena. Por tanto necesitaria eliminar las comillas simples que apareciesen en ella por espacios en blanco, por ejemplo.
No, I don´t want to drop the accents in my string. I need to drop the "simple quotes".
Thanks.
2007 Sep 25 4:34 PM
u can use escape character `.
the key lying on the bottom of Esc.
Regards,
Naveen Natarajan