cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a Excel document using Webdynpro

Former Member
0 Kudos

Hi Folks,

I need a Web application, where user will have an option of uploading an Excel file. Then the application should store this file in application server in Excel format.

Then I need another web application where, I will display a tabular structure with two date column and third column showing as a link to the file. Also this second application will have an option to save the file on desktop. I need a button to pass the data in this file to another program.

Technical issues:

I know how to read data from an excel by using Upload UI element. But how can I store the file on application server in excel format. And then how can I read the Excel file in such way that, I can show a link of this Excel file in a tabular structure displayed on a Webdynpro application.

Please provide your valuable inputs on this technical issue.

Regards

PG

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>But how can I store the file on application server in excel format.

Simply use the ABAP Dataset Commands (OPEN DATASET, TRANSFER TO DATASET). This will allow read/write to the application server file system. Be cautious if you have multiple application servers (which is common in production environments). Use the BINARY mode for the DATASET commands and read/write to/from an XSTRING. This will keep the file in the native, binary format preserving the Excel format.

Former Member
0 Kudos

Hi Thomas,

Thanks for your suggestion.

I will use open and transfer dataset to create and store the Excel sheet on application server.

But in next application, I need to show a Tabular structure with link to this Excel sheet. How can I achieve this target.

Thanks

Regards

PG

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Use a LinkToAction UI element. In the event handler of this UI element, read the corresponding file content from the Application Server file system using the DATASET commands. Then start the download of the file content using the ATTACH_FILE_TO_RESPONSE method of class CL_WD_RUNTIME_SERVICES.