2012 Oct 11 1:55 PM
Hi
ı am usin fm "upload" to upload zip file its working but size of my actual file is 4.419 bytes but FM creates 2400 bytes which is equal to multiple of width and total lines of gt_file . Fm cuts , exceeding part of width.I tried to use an internal table like xstring ı am getting dumb.How can ı solve this issue thanks
DATA: BEGIN OF gt_file OCCURS 0,
line TYPE text200,
END OF gt_file.
DATA gv_filename1 LIKE RLGRAP-FILENAME.
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = gv_filename1
filetype = 'BIN'
filetype_no_change = 'X'
IMPORTING
act_filename = gv_filename1
TABLES
data_tab = gt_file
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE 'Error when reading from file. Operation stopped!' type 'I'.
EXIT.
ENDIF.
2012 Oct 11 2:12 PM
Hi,
You should declare your internal table as TYPE SOLIX_TAB, and use the method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD instead of that old UPLOAD fm...
Furthermore, if you need to unzip your uploaded package you will need to know the exact file length by using the import parameter filelength of the method.
Kr,
Manu.
2012 Oct 11 2:12 PM
Hi,
You should declare your internal table as TYPE SOLIX_TAB, and use the method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD instead of that old UPLOAD fm...
Furthermore, if you need to unzip your uploaded package you will need to know the exact file length by using the import parameter filelength of the method.
Kr,
Manu.
2012 Oct 11 3:53 PM
increasing width of table and using filelength solved the problem thanks