Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Method to download a file through browser

PankajVPatil
Participant
0 Likes
1,326

Hello,

What is the ABAP method to download a file on desktop when the control comes in from the browser window?

I have tried with "cl_gui_frontend_services=>gui_download" method but this does not work and gives unknown error exception.

Is there an alternate method to achieve the download functionality?

Best Regards,

Pankaj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,074

Please ehave a look at CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE( )

Hello,

What is the ABAP method to download a file on desktop when the control comes in from the browser window?

I have tried with "cl_gui_frontend_services=>gui_download" method but this does not work and gives unknown error exception.

Is there an alternate method to achieve the download functionality?

Best Regards,

Pankaj

5 REPLIES 5
Read only

Former Member
0 Likes
1,074

Hi!

Are you using ABAP WebDynpro for that?

In a view's layout tab, there's a filedownload component, you might try out that one.

Regards

Tamá

Read only

0 Likes
1,074

Hi Tamás,

No, I am using a WAD template and there is a button on the WAD report. When I click on button, the selection binding parameters are passed to my customised class through a planning function. Within the implementation of class method, I try to call the GUI_DOWNLOAD method, where it does not work.

Is there any alternative to this?

Best Regards,

Pankaj

Read only

Former Member
0 Likes
1,075

Please ehave a look at CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE( )

Read only

_IvanFemia_
Active Contributor
0 Likes
1,074

Hi,

cl_gui_frontend_services=>gui_download is used if you are using SAP Gui, when in a browser (i.e. WebDynpro) you have to use CL_WD_RUNTIME_SERVICES=>attach_file_to_response.

Regards,

Ivan

Read only

PankajVPatil
Participant
0 Likes
1,074

Thank You.