‎2006 Dec 15 9:08 AM
i use this function to download file to my desktop.
now-> i want to download it to server it's the same?
‎2006 Dec 15 9:12 AM
hi Rani,
Welcome back,,,after long time!!
U can use CG3Z transaction or
OPEN DATASET
TRANSFER
CLOSE DATASET
‎2006 Dec 15 9:10 AM
Hi,
For downloading on server we use Open Dataset.
For example.
OPEN DATASET P_OUT1 FOR OUTPUT IN TEXT MODE.
TRANSFER it_BUFFER TO P_OUT1.
CLOSE DATASET P_OUT1.
Regards,
Amit
‎2006 Dec 15 9:10 AM
if u want to transfer it to the application server then u cant use this function module
u have to use
OPEN DATASET <filename> FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
loop at <itab>.
TRANSFER <itab> TO <filename>.
endloop.
CLOSE DATASET <filename>
statements to transer the data into application server.
Thanks
Elan
‎2006 Dec 15 9:12 AM
hi Rani,
Welcome back,,,after long time!!
U can use CG3Z transaction or
OPEN DATASET
TRANSFER
CLOSE DATASET
‎2006 Dec 15 10:31 AM
i use this
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = filename
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = i_tab
.
can you give me an examp
‎2006 Dec 15 9:12 AM
small piece of code on the same. please check it
Open Dataset
catch system-exceptions DATASET_CANT_OPEN = 8.
open dataset UNIX_FILE for output in text mode encoding default.
endcatch.
Write to Dataset
loop at IT_STR into IS_STR.
catch system-exceptions DATASET_NOT_OPEN = 0 .
transfer IS_STR-STR to UNIX_FILE.
endcatch.
clear : IS_STR.
endloop.
if SY-SUBRC eq 0.
message S138(ZSM) with 'Data in Unix File ' UNIX_FILE.
" Change the status of PO Header
IS_PO-PO_STATUS = 'ACK'.
modify ZES_PO from IS_PO_FINAL.
endif.
Close Dataset
close dataset UNIX_FILE.
Regards
- Gopi
‎2006 Dec 15 9:12 AM
hi
if u want to download it to the application server u have to use the following statement
syntax. open dataset filename for output in text mode encoding default.
for knowing much about this write 'OPEN DATASET' press f1 u will get clear idea.
‎2006 Dec 15 9:14 AM
Hi Rani,
You cannot use the same function for downloading file to server. The FM doesnot provide this facitlity.
For downloading to server, you need to use
1. OPEN DATASET p_file_path FOR OUTPUT.
2. TRANSFER
3. CLOSE DATASET.
For more details refer to the SAP help.
Regards,
Chetan.
PS:Reward points if this helps.
‎2006 Dec 15 9:18 AM
Hi,
The FM's GUI_UPLOAD, GUI_DOWNLOAD both are used to file to upload and download data from internal table to presentation server and viceversa.
The Tcodes CG3Y,CG3z both are used to file to upload and download data from Presentation server file to applciaiton server and viceversa.
If you want to acheive same use
OPEN DATASET
READ DATASET
CLOSE DATASET
Use above three statements to store data in application server file.
Regards
Bhupal Reddy