10-06-2008 8:08 AM
Hi Experts,
Please tell the FM to tansfer data in flat file from presentation server to application server or vice versa in ECC 6.0.
Thanks.
10-06-2008 8:09 AM
Hi Palak Priya,
Use these Tcodes,
CG3Y - Transfer or Download any files from Application server to Presentation server.
CG3Z - Transfer or Upload any files to Application server from Presentation server.
Pls reward if useful,
Thanks,
Murugan.B
10-06-2008 8:19 AM
10-06-2008 8:21 AM
10-06-2008 8:21 AM
Hi,
This is how you can achieve it:
1. You read the flat file from presentation layer and store the file content in internal table gt_inrec
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gw_filename
filetype = 'ASC'
IMPORTING
filelength = gw_length
header = gw_header
TABLES
data_tab = gt_inrec
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
2. Create a new file at the application server:
OPEN DATASET p_ofile FOR OUTPUT IN
TEXT MODE ENCODING DEFAULT.
3. Transfer the content from the internal table into the file at the application server:
LOOP AT gt_inrec.
TRANSFER gt_inrec-record TO p_ofile.
ENDLOOP.
Hope it helps,
Lim....
10-06-2008 8:22 AM
Hi Priya,
You have to use gui_upload and open dataset statements.
Regards,
Charumathi.B