Skip to Content
0
Former Member
Nov 30, 2006 at 09:09 PM

sign"#"actually a square when opening file transfered via ftp with notepad

23 Views

i am using code on Unix/non-unicode system:

check not filename is initial.

open dataset filename for output in text mode encoding non-unicode.

if sy-subrc ne 0.

write: / msg, filename.

exit.

endif.

loop at result.

transfer result to filename.

endloop.

When I transfer the fle via ftp to my PC I get no break of line i.e. i get e-g:

0000994126 000010 011 ZCEN 11230.80¸#0000994126 000010 045 ZTPC

instead of:

0000994126 000010 011 ZCEN 11230.80

0000994126 000010 045 ZTPC

sign"#"actually it is a square BUT only when opened the file with notepad(when opened with wordpad I get no problems i.e i get :

0000994126 000010 011 ZCEN 11230.80

0000994126 000010 045 ZTPC

Also good result when I download same int. table with::

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE = ' '

  • CODEPAGE = ' '

filename = p_file1

filetype = 'DAT'

mode = ' '

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = result

EXCEPTIONS

file_open_error = 1

file_write_error = 2

invalid_filesize = 3

invalid_table_width = 4

invalid_type = 5

no_batch = 6

unknown_error = 7

OTHERS = 8.

but I need the file on the (local) unix ftp server(so other system can download it.

Please help me

Thank you in advance