‎2009 Oct 28 10:11 AM
HI ALL
i need to read data from server (open data set ) and i want to create directory
(file ) how can i do so ?
Regards
Chris
‎2009 Oct 28 10:22 AM
Directory is different from a file. Which exactly of these you want to create?
‎2009 Oct 28 10:22 AM
Directory is different from a file. Which exactly of these you want to create?
‎2009 Oct 28 8:19 PM
HI ,
I need to create directory and create report that can in F4 open the directory ,
in this directory i can put the file which i can read with open dataset .
Thanks
Chris
‎2009 Oct 29 3:51 AM
hi
you can use CG3z to upload the file...
it means that if you give the non-existing path..it will be created as directory..
eg: usr/sap/tmp/chris if you give this as path it should create your own path..
where you can create mulitiple files
cheers
s.janagar
‎2009 Oct 29 4:27 AM
ARCHIVEFILE_SERVER_TO_SERVER - Move file from one directory to another
F4_DXFILENAME_TOPRECURSION - F4 functionality for filename on Application Server
PFL_CHECK_OS_FILE_EXISTENCE - validate_server_file
data:begin of itab1 occurs 0,"Text file format
matnr(18),
bwkrs(4),
end of itab1.
*Uploading of text file from Application server.
open dataset w_dataset1 for input in text mode.
do.
if sy-subrc <> 0.
exit.
endif.
read dataset w_dataset1 into itab1.
append itab1.
clear itab1.
enddo.
close dataset w_dataset1.
‎2009 Oct 28 10:23 AM
‎2009 Oct 28 10:24 AM
to create a file:
http://abaplovers.blogspot.com/2008/05/sap-abap-data-download-to-application.html
to read a file:
OPEN DATASET FNAME FOR INPUT IN BINARY MODE.
DO.
READ DATASET FNAME INTO TEXT2 LENGTH LENG.
WRITE: / SY-SUBRC, TEXT2, LENG.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET FNAME.
‎2009 Oct 28 10:30 AM