cancel
Showing results for 
Search instead for 
Did you mean: 

How to download .xlsx file which is stored as MIME object in Custom Component

Former Member
0 Kudos

Dear Experts,

Can anyone let me know how to download .XLSX file which is stored as MIME object.

The scenario is " I have one .xlsx file stored as MIME object and i have on link i.e download template. on click of this link, i need to open this excel file".

Thanks

KH

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

you can use:

  DATA: lr_mime_repository TYPE REF TO IF_MR_API.

  lr_mime_repository = cl_mime_repository_api=>get_api( ).

  lr_mime_repository->get( ).

In get( ) method, specify parameter i_url, which will point to your file in the MIME repository. If you upload a MIME to a component, it will get a mirrored view in the path:

SAP/BC/WebDynpro/SAP/your_component_name/your_file_name

The get( ) method will return your file in XSTRING format, which you can send to the user using CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE as suggested in the earlier post.

former_member197475
Active Contributor
0 Kudos

Hi Katrice,

Can you please describe the requirement. You have .XLSX file in MIME????

Below wiki helps you to download excel file from the table.

http://wiki.scn.sap.com/wiki/display/WDABAP/Upload+and+Download+files+in+Webdynpro+ABAP

BR,

RAM.

Former Member
0 Kudos

Hi

Use CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE

Best regards