‎2008 Apr 04 6:30 AM
Hi,
I have one query regarding reading file from application server.
I want to read file from XI application server into ISU server.. Can this be done using OPEN DATASET??
Is there any function module to read data..Please advise.
Thanks in advance,
Minal
‎2008 Apr 04 6:41 AM
hope it will help you.
Reward if help.
open dataset <dataset name> for output in text mode.
if sy-subrc = 0.
loop at itab4.
at first.
write:/ ' customer ','billing doc.',
'Billing date',' Release date','Release doc.',
' material ','G/L amount'.
endat.
write:/ itab4-name1.
write at 36 itab4-vbeln.
write at 47 itab4-zfbdt.
write at 61 itab4-augcp.
write at 74 itab4-augbl.
write at 88 itab4-arktx.
write at 127 itab4-pswbt.
transfer itab4 to <dataset name>.
endloop.
close dataset <dataset name>.
endif.
Use Gui_Download f.M.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = <fullpath>
FILETYPE = 'BIN'
TABLES
DATA_TAB = <your internal table>
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.
‎2008 Apr 04 6:42 AM
Hi,
You can use CG3Y transaction code to download the file and then you can use CG3Z to upload this file to ISU server.
But I am not sure whether these tCodes available in XI System.
If exists it will solve your issue.
Kind Regards,
Ravi Sankar.Z
Edited by: Ravi Sankara. Z on Apr 4, 2008 7:47 AM