Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Upload a File in AL11 whose format is .csv

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

Hi Vijay

How can i make the file name .csv?

Thanks,

Jim

0 Kudos

Use Transaction CG3Z ,if it is one time upload to AServer.

and CG3Y for download from Aserver

Former Member
0 Kudos

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 ?

Former Member
0 Kudos

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