2007 Sep 18 12:53 PM
Dear All,
Please help me in below topic:
I have to create one text file through my Report and load it to given logical path. How to do it?
Thanks in advance,
Prasad
Dear All,
Please help me in below topic:
I have to create one text file through my Report and load it to given logical path. How to do it?
Thanks in advance,
Prasad
2007 Sep 18 1:03 PM
Hi,
You can write a report to create a text file...guess that will be nothing hard..Then use the function module WS_FILENAME_GET to get the file and load it in the path. This is one way to get this done.
Regards,
2007 Sep 18 1:08 PM
hiPrasad,
select the data from SAP tables whuch ever u want to download into the file.
use the fm GUI_DOWNLOAD to put the data into the specified file.
to get the file from presentaion server use fm WS_FILENAME_GET
<b>Reward points if useful</b>
Chandra
2007 Sep 18 1:11 PM
2007 Sep 18 1:22 PM
hi,
try this. <b>LIST_DOWNLOAD</b>
CALL FUNCTION 'LIST_DOWNLOAD'
EXPORTING
LIST_INDEX = sy-lsind
METHOD = ' NOCO'
EXCEPTIONS
LIST_DOWNLOAD_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
RTF - Save in rich text format
DAT - Save as spreadsheet
NOCO - Save without converting
Hope it will b helpful.
2007 Sep 18 1:23 PM
Prasad,
you say you want the FM to load the file on a given logical path.....
So...you know the destination ..as to where you file has to be stored...
say( Application Server).
Am i right????
2007 Sep 18 1:24 PM
hi
i think u can use CG3Z transaction for downloading file to application server
and CG3Y for presentation server...
there u can specify both source patha and target path...
hope it helps..
2007 Sep 18 1:27 PM
hi,
create a internal table and using select populate data into that table
and use Gui_download fm for downlaoding data n WS_FILENAME_GET for selecting path for download
as
data: p_file type rlgrap-filename.
CALL FUNCTION 'FILENAME_GET'
EXPORTING
filename = p_file
title =
IMPORTING
FILENAME =
.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = p_file
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
tables
data_tab = itab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if helpful reward some points.
with regards,
Suresh Aluri.
2007 Sep 18 2:37 PM
Could anyone tell me what value should be passed to 'has_field_seperator' parameter of FM GUI_UPLOAD, to uplaod text file, having fields seperated by SPACE in internal table?
Prasad.
2007 Sep 19 7:20 AM
Hi Marvin,
Yes exactly, I want to load data on the application server in text format(*.txt). Do u know the code/FM for this?
Thanks in advance.
Prasad
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |