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: 

sending a file from the SAP app server to a network

Former Member
0 Kudos

Hello,

I am writing a program that will run in the background a create a file on the SAP app server. I would like to get this from that server to a network server. I know about the tocde CG3Y and the function module C13X_APP_TO_FRONT_END that this tcode uses. I tried to run this function module stand alone but the only this that you are allowed to enter in the filetype. after that a pop-up box appears where you enter the filenames. is there a way that I could use this in my program to automatically send the file from the app server to the network server.

thanks in advance for the help

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can communicate with the frontend via the GUI_DOWNLOAD function module in background, but you really have to jump thru hoops to do it. Here is a document.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

You can see that this is really a pain, and you would have to do all this to every PC that is to be used in this senario, so really the rule of thumb is that you can not download to PC from the background.

Regards,

Rich Heilman

4 REPLIES 4

andreas_mann3
Active Contributor
0 Kudos

use fm GUI_DOWNLOAD

or class CL_GUI_FRONTEND_SERVICES

method GUI_DOWNLOAD

____________

God's blessing

Andreas

Former Member
0 Kudos

I am running this job in background

does GUI_DOWNLOAD work when running in background

0 Kudos

Timothy,

GUI_DOWNLOAD doesn't work in background. You can use Open Dataset to read the file from the App Server.

Chandra.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can communicate with the frontend via the GUI_DOWNLOAD function module in background, but you really have to jump thru hoops to do it. Here is a document.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

You can see that this is really a pain, and you would have to do all this to every PC that is to be used in this senario, so really the rule of thumb is that you can not download to PC from the background.

Regards,

Rich Heilman