cancel
Showing results for 
Search instead for 
Did you mean: 

Help writting a file without crlf control characters

Former Member
0 Kudos

Hi All,

I have a little trouble when writting a file in UTF-8 format, It's only one string and this string is writting to a file in UTF-8 format but I need to omitt the CR-LF Control Characters of the file generated.

OS - HP-UX

How can I do this?

here is the sample code:

DATA: g_cadena TYPE string, g_filcad TYPE string. DATA: l_len TYPE i, l_msg TYPE string. CONCATENATE '||A|1|2005-09-02T16:30:00|1|ISP900909Q88|' 'Industrias del Sur Poniente, S.A. de C.V.|' 'Alvaro Obregón|37|3|Col. Roma Norte|México|' 'Cuauhtémoc|Distrito Federal|México|06700|' 'Pino Suarez|23|Centro|Monterrey|Monterrey|Nuevo Léon|' 'México|95460|CAUR390312S87|Rosa María Calderón Uriegas|' 'Topochico|52|Jardines del Valle|Monterrey|Monterrey|' 'Nuevo León|México|95465|10|Caja|Vasos decorados|20|200|1|' 'pieza|Charola metálica|150|150|IVA|52.5||' INTO g_cadena. l_len = STRLEN( g_cadena ). CLEAR g_filcad. g_filcad = '/usr/home/cadena.txt'. OPEN DATASET g_filcad FOR OUTPUT MESSAGE l_msg IN TEXT MODE ENCODING UTF-8. IF sy-subrc NE 0. WRITE: / 'Message:', l_msg. RETURN. ENDIF. TRANSFER g_cadena TO g_filcad LENGTH l_len. CLOSE DATASET g_filcad.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I Solved by my self

Former Member
0 Kudos

Thanks to all.

I solved by my self.

Regards