ABAP Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Background spool open as Excel file

jeff_broodwar
Active Participant
0 Kudos
554

Hi,

I'd like to know if it's possible to generate an excel spool? The requirement is to run the alv in background and open the spool as excel.

Not using the following:

- No emailing

- No download to local file

- No  file path.

Hoping to get a simple code to start with.

Thanks,

Geoff

9 REPLIES 9
Read only

luis-santos
Explorer
0 Kudos
538

You can build a excel file by yourself and attach to the spool. I don't have code to show you but i think there is some info here, in community.

Read only

RaymondGiuseppi
Active Contributor
441

To convert ALV to Excel, consider

Or provide a technical definition for 'excel spool' (Jump from SP02 to MS Excel ?)

  • Convert spool to text and send it to Excel as Import (OLE2) to regenate grid from | and other separators

 

Read only

Sandra_Rossi
Active Contributor
440

I think only very few people saw a spool request of type binary (possibly linked to PDF).

Many would say that it's not possible.

Spool means something to be printed. It's not intended to solely store and download files.

Keep it simple, do something that you know is possible.

Store as a file, propose a transaction to download it and give authorizations to users.

Read only

jeff_broodwar
Active Participant
0 Kudos
343

Thank you all for the feedback. Yes I didn't see any straight spool excel file. I communicated with the functional and it was clarified that it was not mentioned that they wanted an email to be sent after creating the spool. The email should have an excel file attachment (spool converted to excel).

I have another question, is it not possible to send an excel attachment via spool list recipient in SM37?

Thanks!

Geoff

Read only

331

It's not possible to send an Excel attachment via spool list recipient in SM37.

You may send only the formats specified in SCOT > Options > SMTP connections > Outbound > SMTP Node > Internet > Double click to see the options.

They are also described here: Formats | SAP Help Portal

Sandra_Rossi_0-1762441615152.png

 

Read only

321

In latest version, no change at SAP Connect Adminitration \ Node \ Formats 

  • Converting to the xlsx format requires some wrapper development.
Read only

0 Kudos
317

Thanks Sandra.

Read only

Sivakumar_Subramaniam
Product and Topic Expert
Product and Topic Expert
327

Hello Geoff,

You can use class CL_SALV_BS_RUNTIME_INFO to get the AlV report contents in an internal table and download it as an excel or send as an email attachment without needing to send the report to spool. 
https://community.sap.com/t5/application-development-and-automation-blog-posts/gain-programmatic-acc...

Best Regards,

Siva

Read only

324

Also, CL_SALV_TABLE and method TO_XML (any kind of supported format like XLSX, not limited to XML) can be used.