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: 

Transfer file in background

former_member671224
Participant
0 Kudos
160

Hi Guru's

A custom program was created to get data from application server to presentation server. Its working fine in foreground but in background its not working. I used GUI_DOWNLOAD function module for downloading. Its throwing <b>unknown error(sy-subrc - 6).</b> Please help me in this. its very urgent.

Thanks,

Amal

1 ACCEPTED SOLUTION

gopi_narendra
Active Contributor
0 Kudos
99

You can not use the FM in background as the GUI will not be avaialable during a background process.

So you have to download it to the application server using the open dataset, transfer, close dataset statements.

And then you can download from application server to the presentation server using the tcode CG3Y.

Regards

Gopi

4 REPLIES 4

gopi_narendra
Active Contributor
0 Kudos
100

You can not use the FM in background as the GUI will not be avaialable during a background process.

So you have to download it to the application server using the open dataset, transfer, close dataset statements.

And then you can download from application server to the presentation server using the tcode CG3Y.

Regards

Gopi

0 Kudos
99

Actully the file was there in Application server. It was download to internal table. but couldnt able to download to presentation server. That too only when downloading through background job. even i tried to download using WS_DOWNLOAD function module. it is giving unknown error.(subrc 6).

Thnks,

Amal

0 Kudos
99

Hi Amal,

<b>ALL</b> the FM which are used for file processing on presentation server will not work in background.

Regards,

Atish

0 Kudos
99

Hi Gopi and Atish,

Thanks for your help.

I understood tht we can't communicate with presentation server using *_DOWNLOAD function modules.

if needed we can do this by creating RFC destination and doing some setting in Desktop system.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2">reference document</a>

Regards,

Amal