Problem solve Get help with specific problems with your technologies, process and projects.

Downloading to Excel in a background task

Read advice on how develop a program to download table entries into an Excel file in SAP.

ITKnowledge Exchange member "RaghuP" had a question about how to download a table's entries to an Excel file in a background task and fellow techies helped out. Here is a portion of the conversation. Read the rest of the thread.

Want to join in on a similar conversation? Register for ITKnowledge Exchange and fill out your profile so you can...

ask specific sets of people your IT questions and also help out your fellow geeks.

ITKnowledge Exchange member "RaghuP" asked:
I need to develop a program to download a table's entries into an Excel file. This program will be scheduled in the background for weekly reporting. I am currently using FM EXCEL_OLE_STANDARD_DAT, which is working fine in the foreground, but not in the background. Can anyone help?

Things that work online will not necessarily work the same in the background when the PC is not present. If you need the table at a certain point in time, why not create a Z-table of the same format and schedule a background job to copy LFBK to it? Then you can download to Excel whenever you're online again using SE16 or (better) SQVI.


If you absolutely have to download to Excel format, why not send an e-mail with an attachment in Excel format to specified recipients? There's no need to maintain another table, and it won't need any user interaction, even after the program is executed.


If the Excel data formatting is not important, then I suggest you create a tab delimited text file as a background job and save it on an external server that is accessible to the PC user. The user can then open this file using Excel. To save the tab delimited file on the external server, you can use the function module FTP_CONNECT and the FTP command PUT in the function module FTP_COMMAND.

Dig Deeper on SAP development and programming languages