cancel
Showing results for 
Search instead for 
Did you mean: 

Download SOFM-document from Web Dynpro

Former Member
0 Kudos

I have a Web Dynpro application. I have a SOFM-document (BOR-object ), saved in the system ( i know document id). I need to create a link or button in Web Dynpro application to open/download this file.

I found FileDownload element, but i don't understand what format of file it requires.
How to manage it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The problem is solved by concatenating the code from thread
https://scn.sap.com/thread/1940520
and function module from Ramakrishnan Murugan advice:
wdr_task=>client_window->client->attach_file_to_response(
i_filename = L_FILENAME
i_content = L_XSTRING
i_mime_type = L_MIMETYPE ).

Answers (1)

Answers (1)

former_member197475
Active Contributor
0 Kudos

Hi Michael,

You can achieve your download option by two ways.

1. Using FileDownload UI element.

Change your contents into Xstring using Function  SCMS_STRING_TO_XSTRING and then pass the contents to

cl_wd_runtime_services=>attach_file_to_response

     EXPORTING

       i_filename      = '  '  "file format eg .csv .xls

       i_content      = xstr

       i_mime_type    = '  '


2. Using LinkToAction UI element.


Here also you can follow the same logic of passing the xsting contents to the same above mentioned method.


But am sorry, I haven't tried the download option with BOR object. Guess you can try it out now



BR,

RAM.