04-25-2007 11:29 AM
Hi Exports,
Flat file comes to our Internal table.then i build our logic.After that i wann to save this flat file is some location(may be in presentation/ application server).that to file name along with date,time and location.agin i run the pgm and save same location and file name is also same.
here iam giving file format.
emp no file name location.
1 XXX h:\kkk.txt
2
3
4
5
again i am running same pgm
emp no file name location.
6 XXX h:\kkk.txt
7
8
9
10
file name and location same but diff emp no.
Regards,
Krishna.
04-25-2007 11:59 AM
Hi,
Use GUI_DOWNLOAD function module and pass your internal table and the path where to save..
CALL FM 'GUI_DOWNLOAD'
importing
FILENAME = 'C:\default\test
filetype = 'ASC'
tables
data_itab = it_itab..
reward if useful
regards,
nazeer
Message was edited by:
nazeer shaik
04-25-2007 11:59 AM
Hi,
Use GUI_DOWNLOAD function module and pass your internal table and the path where to save..
CALL FM 'GUI_DOWNLOAD'
importing
FILENAME = 'C:\default\test
filetype = 'ASC'
tables
data_itab = it_itab..
reward if useful
regards,
nazeer
Message was edited by:
nazeer shaik
04-25-2007 12:46 PM
Hi Krishna Kumar,
if u wnat to download in to presentation server..
then use GUI_DOWNLOAD.
if u want to save in application server (in AL11) then u need to use
open data set...
DATA : dl_string(250). " String
*--Open data set
OPEN DATASET dg_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc <> 0.
dg_subrc = sy-subrc.
ELSE.
*--Transfer data
DO.
READ DATASET dg_filename INTO dl_string.
IF sy-subrc = 0.
APPEND dl_string TO dt_data.
CLEAR dl_string.
ELSE.
EXIT.
ENDIF.
ENDDO.
*--Close data set
CLOSE DATASET dg_filename.
ENDIF.