05-11-2010 10:10 PM
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.
05-12-2010 5:49 AM
There is a display restriction of 255 chars when you open the file in AL11. But the whole file will be stored. To check this use the transaction CG3Y to download the file to the presentation server again and check
Vikranth
05-11-2010 11:49 PM
Hi,
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.
While Transferring why u are using LENGTH.
Remove that try to transfer..
05-12-2010 5:49 AM
There is a display restriction of 255 chars when you open the file in AL11. But the whole file will be stored. To check this use the transaction CG3Y to download the file to the presentation server again and check
Vikranth
05-12-2010 5:58 AM
Hi,
In AL11 transaction You'll be able to see upto 255 characters only. To see the complete file download it to presentation server using CG3Y transaction. Else, check the file directly in application server system.
Regards,
Lakshman.
05-12-2010 8:30 PM
guys
i appreciate your quick response, but in itab before i write, each row has 574char
once i transfer to unix file first 255 char is stored on appl server
as you suggested i downloaded the file to desktop and i see the same as i see on AL11, data above 255 char got truncated
please advise
05-12-2010 8:38 PM
05-12-2010 9:57 PM
LV_LEN gives me 574 hence i understand that itab has all the data from text file uploaded