Skip to Content
0
May 11, 2010 at 09:10 PM

TRANSFER statement issue

51 Views

task: upload a text file from desktop to unix

step 1. CALL FUNCTION 'GUI_UPLOAD' upload desktop text file into it_tab

step 2. Open data set, Loop on it_tab into Field symbol

step 3. Transfer field symbol to output file path

uploading a file is successful with each row 579 char

now it_tab has each row 579 char

when i try to transfer to opened file, it writes only 255 char

i tried length too, it didnt work

please advise

types: begin of st_tab,

line(3000) type c,

end of st_tab.

data: it_tab type standard table of st_tab with header line,

OPEN DATASET p_FILE FOR OUTPUT IN TEXT MODE.

IF SY-SUBRC = 0.

LOOP AT it_tab ASSIGNING <lfs_outfile>.

DESCRIBE FIELD <lfs_outfile> LENGTH lv_len.

TRANSFER <lfs_outfile> TO p_FILE LENGTH lv_len.

ENDLOOP.

WRITE: 'The report is written to unix file'.

ELSE.

WRITE: 'The report output could not be written to unix file'.

endif.