Application Development and Automation 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: 
Read only

Convert to csv format

Former Member
0 Likes
2,794

Hi All,

I am working on a report wherein i need to download data in csv, txt, xls format.

I am using standard SAP Fm's SAP_CONVERT_TO_CSV_FORMAT etc.

But the extract as downloaded from al11 shows hidden data in only one cell in excel sheet

eg: say the extract contains 5 records. After downlioading the file in excel or csv format, it shows only one record and when you click on cell A, it actually contains 5 records.

However, using gui_download the extract is downloaded to presentation server correctly.

Any pointers to where the problem could be, or please suggest some other FM for csv conversion etc.

5 REPLIES 5
Read only

Former Member
0 Likes
785

Pass the value to field separator in the function module:

I_FIELD_SEPERATOR = 'X'

Regards,

Gurpreet

Read only

Former Member
0 Likes
785

Hi,

When downloading the File using GUI_DOWNLOAD in EXCEL format FILETYPE should be 'DAT'.

If You uisng the FILETYPE as 'ASC' then you need to pass the WRITE_FIELD_SEPARATOR as 'X"

Read only

Former Member
0 Likes
785

hi shreya tagra ,

u can use the GUI_DOUNLOAD function module with extension .CSV

concatenate the .csv to the inputfile in the last..

Regds / Prabhu

Read only

0 Likes
785

Hi All,

Closing this thread after along time.

This problem was solved. Issue was there iwth open dataset statement for .csv or .xls.format we need to open it in TEXT MODE ENCODING DEFAULT.

Thanks for your replies.

Regards,

Shreya

Edited by: shreya tagra on Jun 12, 2009 8:35 AM

Read only

vijay_kumar133
Active Participant
0 Likes
785

Hi Shreya,

I have a similar requirement to convert the itab data to CSV and download it to desktop.

Can u guide me the on what parameters to be pass in SAP_CONVERT_TO_CSV_FORMAT FM and how to download it to desktop