2007 May 22 8:07 AM
i HAVE TEXT FILE ON MY DESKTOP. nOW i WANT TO UPLOAD THAT FILE ON THE SERVER. hOW i WILL DO THAT. aNYONE CAN GIVE ME CODE FOR THAT. THANKS.
2007 May 22 8:11 AM
Hi Abhay,
This include 2 step..
1) upload file from desktop to internal table. Use function module GUI_UPLOAD to fetch data from desktop to internal table.
2) download the file from internal table to application server. below code is for downloading to app server
a) OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc IS INITIAL.
LOOP AT ut_file INTO lw_file.
b) TRANSFER lw_file TO lv_file.
ENDLOOP.
c) CLOSE DATASET lv_file.
MESSAGE s145(bb) WITH text-009.
ENDIF.
2007 May 22 8:11 AM
Hi Abhay,
This include 2 step..
1) upload file from desktop to internal table. Use function module GUI_UPLOAD to fetch data from desktop to internal table.
2) download the file from internal table to application server. below code is for downloading to app server
a) OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc IS INITIAL.
LOOP AT ut_file INTO lw_file.
b) TRANSFER lw_file TO lv_file.
ENDLOOP.
c) CLOSE DATASET lv_file.
MESSAGE s145(bb) WITH text-009.
ENDIF.
2007 May 22 8:13 AM
2007 May 22 8:19 AM
2007 May 22 8:20 AM