Application Development 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: 

FM or CLASS to Download a file

Former Member
0 Kudos

Which FM or CLASS Interface should be used to download a file in background.

I used CALL METHOD cl_gui_frontend_services=>execute.

But its giving cancelled status.

Ravi

10 REPLIES 10

Former Member
0 Kudos

Hi,

If you want to download a file from the desktop server, you can use the function module in BDC 'GUI_DOWNLOAD' or if you are downlading it from the application server, you can use OPEN DATASET and CLOSE DATASET and then use TRANSFER to transfer the internal table into the file.

Is that what you want?

Regards,

Aswin

0 Kudos

hi Ravi,

<b>We cannot download a file in background</b> Check this out

Former Member
0 Kudos

Hi,

The class will not work in background.

You should use OPEN DATASET, TRANSFER, CLOSE DATASET statements and you can download data only to the application server in background.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

Data transfer is not possible on the PRESENTATION SERVER in BACKGROUP MODE.

rahulkavuri
Active Contributor
0 Kudos

The above 2 explain about downloading a file in the background

Former Member
0 Kudos

Hi ravi,

1. We cannot download a file in background

to any front-end server.

2. For that we need to use

open dataset

transfer

close dataset

so that the file is downloaded on application server.

regards,

amit m.

former_member181962
Active Contributor
0 Kudos

Check the link to download a file in background

http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

Regards,

Ravi

former_member188685
Active Contributor
0 Kudos

Hi,

the Fm's you are expected won't work in Background. so you should explicitly go for writing the File to APplication server using

Open dataset, loop at itab and Transfer , Close dataset.

you can see lot of samples to write the content to application server.

Regards

vijay

Former Member
0 Kudos

hi ravi,

u cannot download a file onto the Presentation server in background.

check this thread

hope this helps,

priya.

Former Member
0 Kudos

Hi you can shcek with the following t-codes :

CG3Z : Upload file from presentation server to application server

CG3Y : To Download files from application server to presentation server

Regards,

Kunal.