01-18-2007 6:53 AM
Hi,
I need to create a program that will create a flat file. This flat file will be stored in the unix directory. But my problem is, the flat file should be in the .csv format when uploaded in AL11. How do i do this?
Thanks,
Jim
01-18-2007 6:59 AM
Hi Jim
You can acheive this by making use of the datasets as follows. In order to make it comma seperated (CSV), all u need to do is, before you trasfer the contents to the file in application server, just concatenate all the fields seperated by ','
<opendataset>
<trasfer the details from work area to this opened file>
CONCATENATE <wa-fields> INTO <variable> SEPARATED BY ','.
TRANSFER <variable> to the file.
<close dataset>
PLZ REWARD POINTS
01-18-2007 7:00 AM
01-18-2007 7:02 AM
Use Transaction CG3Z ,if it is one time upload to AServer.
and CG3Y for download from Aserver
01-18-2007 7:02 AM
I found this file name in our unix directory:
cogi2_wips_20061222_060154.csv
Is this a matter of giving name to the file? How to give the fila a file name ?
01-18-2007 7:03 AM
Hi Jim,
You can do this in 2 says:
1. Either specify it in your selection screen, where you will be providing the path in the application server.
Ex. /temp/sample.csv
2. In the program itself, default the path along with the file name:
lv_s TYPE rlgrap-filename VALUE '/usr/sap/R3I/DVEBMGS00/work/sample.csv'.
The CSV file is created as you have given "SEPERATED BY ',' " in the concat stmt.
This should solve the problem
PLZ REWARD POINTS IF HELPFUL