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: 

Export Abap Report to Excel .CSV Format

Former Member
0 Kudos

Dear All,

        I have a requirement to download the SAP report to Excel .CSV  Format . I am using FM 'SAP_CONVERT_TO_CSV_FORMAT' and FM '

GUI_DOWNLOAD' to download the file to .csv format. The problem i am facing is the file is downloaded to excel  .csv format but all the values are present in single column . Eg. Field1 , Filed 2 ..... all are present in the A1 Cell i.e present in the single Column . I want the data to be displayed in separate columns . Eg. Field1 in a1 Cell , Field2 in B1 Cell ......etc.

Could anyone please show me a way around this.

Regards

Amba

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

If you use GUI_DOWNLOAD for downloading Excel .CSV Format, then pass

   WRITE_FIELD_SEPARATOR           = '  '  and FILETYPE = 'DBF'  for leading with zero's.

Note : Suppose field1 = material number

if you use file type ='DBF' then material number download leading with zero's.

'000000000000001698' .



Regard's

Smruti

5 REPLIES 5

Former Member
0 Kudos

Hi ,

If you use GUI_DOWNLOAD for downloading Excel .CSV Format, then pass

   WRITE_FIELD_SEPARATOR           = '  '  and FILETYPE = 'DBF'  for leading with zero's.

Note : Suppose field1 = material number

if you use file type ='DBF' then material number download leading with zero's.

'000000000000001698' .



Regard's

Smruti

0 Kudos

Hi Smruti,

  Thank u for the answer ... My Problem resloved....I am getting the values to be displayed in each column ...

I am getting the column heading as F1,F2,F3......

How to change it my requirement heading as Date , Doc. No........

Could u please show me a way around this.

Regards

Amba



0 Kudos

Now Pass WA_MAKT1 TO FIELDNAMES In GUI_DOWNLOAD FM.

Out_Put:

Regard's

Smruti

0 Kudos

Hi Smruti,

           Thank u very much ... The problem is resolved ... I did as per ur steps ....Once again thank u .

Regards ,

Amba

sujeet2918
Active Contributor
0 Kudos

Hi,