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: 

Background report list download to excel

santosh_patil6
Explorer
0 Kudos
9,766

I run an ALV hierarchical sequential report in background. Then when I download the report output ( thro SM37 ) to excel, the whole output of the report comes in one cell ( excel ). In other words the columns of the report will not appear in excel.

for example:

I have 3 columns and 4 rows as the report output ( in SM37 ). When I download it to excel, the excel will have only 1 column and 4 rows.

I need info on making the excel output to look same as the report output; in terms of column.

11 REPLIES 11

Former Member
0 Kudos
2,957

Hi,

are you using GUI_DOWNLOAD then in background it won't work properly..

if you are using some other FM then let us know..

regards

vijay

0 Kudos
2,957

Sorry, I think i was not clear.

No I'm not using any FM in the report.

I schedule a report( ALV-Hierarchical Sequential) for background processing. Then I go to SM37 to check the report output. In SM37 I have an option ( on the application tool bar ) to download the report output to say Spreadsheet, word, html etc.,

I use the option download in excel format and the report output in excel format will not have the same alignment( columns) as in the report output in SM37.

0 Kudos
2,957

goto spreadsheet>pivot table>microsoft excel

this will download in different columns

0 Kudos
2,957

I don't see an option pivot table after selecting spreadsheet. What I get is a dailog box for file name.

Help me find the pivot table option.

Former Member
0 Kudos
2,957

Hi,

Save the output as .TXT file. Then when you open the TXT file in Excel, you will be presented a Text Import wizard screen in Excel where you can choose the Fixed Width option and specify the column widths.

Regards,

Rao A

Former Member
0 Kudos
2,957

Hi santosh,

1. I tried the same at my end.

Its working perfectly fine.

2. Another way u can try is

3. Download it in UNCONVERTED format

to a TXT file.

4. Then open that file in EXCEL.

regards,

amit m.

0 Kudos
2,957

Hi,

I'm still not able to get the aglinment correct. I face this problem only with hierarchical sequential ALV Reports.

I don't have a pivot table option.

Any other option, I have.

One more thing when I run the same report in foreground and download it to excel( using the download option on application tool bar ), I don't have any mis-alignment.

It only happens when i run it in background.

rgds,

SP.

Krishna_SAP1
Product and Topic Expert
Product and Topic Expert
0 Kudos
2,957

Hi Amit,

Actually I do have a similar issue. I have a report which output is in the form of excel sheet. I developed using ole2 objects. I have a lot of customization like colors, heading and different margins. Is there any way can I run it in background. I cannot save it in shared folders su01 because it does not support ole objects. Actually, If I run this program in foreground now, The form gets loaded with all the data, it saves the file in the given path , and then closes the file. But, when I run it in as a background job, the data is not getting loaded. Is there any other way to run this in background.

Krishna.

matt
Active Contributor
0 Kudos
2,957

If you need to create formatted Excel sheets in background then http://scn.sap.com/community/abap/blog/2010/07/12/abap2xlsx--generate-your-professional-excel-spread... is what you need. It's also a lot easier than OLE for foreground use.

santosh_patil6
Explorer
0 Kudos
2,957

Solved it by creating a page format in SPAD.

0 Kudos
2,957

Hi Santosh,

Plz let me know which format u have used to solve this. please give me brief details.

thanks

Surendra