2006 Oct 04 6:13 PM
Hello,
I have created a process which creates a file. this process uses GUI_DOWNLOAD to put the file on the users C drive or other directory on our network. The user wants to run this process in background and the program is returning a 6 (error unknown) from the GUI_DOWNLOAD FM. I was looking on SDN and found out the GUI_DOWNLOAD only works in foreground. You have to use OPEN and CLOSE DATASET statements to process in background. I am thinking about putting a button to denote foreground/background processing and using the appropriate statements to process the file. I will then have to get the file from the app server to a place will the user can get access to it.
<b>first question</b> - is there a FM to do a FTP from the app server to a directory on our network for the user to access?
<b>second question</b> - is this the right approach or is there something else that I should be doing.
thanks in advance for your help
2006 Oct 04 6:25 PM
Hi,
Yes, your right, GUI_DOWNLOAD wil not work in background mode, you need to place the file in Application server, here.
See the below link for a FTP program, use the proper commands(i do not know whether downloading the file is possible through the commands)
http://www.sap-img.com/ab003.htm
or else, write a small program which downloads the data from the application server, but it should run in the foreground
Regards
Sudheer
Hello,
I have created a process which creates a file. this process uses GUI_DOWNLOAD to put the file on the users C drive or other directory on our network. The user wants to run this process in background and the program is returning a 6 (error unknown) from the GUI_DOWNLOAD FM. I was looking on SDN and found out the GUI_DOWNLOAD only works in foreground. You have to use OPEN and CLOSE DATASET statements to process in background. I am thinking about putting a button to denote foreground/background processing and using the appropriate statements to process the file. I will then have to get the file from the app server to a place will the user can get access to it.
<b>first question</b> - is there a FM to do a FTP from the app server to a directory on our network for the user to access?
<b>second question</b> - is this the right approach or is there something else that I should be doing.
thanks in advance for your help
2006 Oct 04 6:19 PM
This sounds OK. When I've done this, it's a two step process. If the user puts the file onto the ap server, we have another program that runs in the foreground that reads the file and downloads it (no FTP).
Rob
2006 Oct 04 6:25 PM
Hi,
Yes, your right, GUI_DOWNLOAD wil not work in background mode, you need to place the file in Application server, here.
See the below link for a FTP program, use the proper commands(i do not know whether downloading the file is possible through the commands)
http://www.sap-img.com/ab003.htm
or else, write a small program which downloads the data from the application server, but it should run in the foreground
Regards
Sudheer
2006 Oct 04 6:26 PM
Rob,
so your saying the if the user wants to run in background, he submits the first pgm in background to create the file and submit a second pgm in foreground to read the newly created file and create the file on the user's C drive or where ever he wants it. is this correct? the user has to submits 2 programs?
2006 Oct 04 6:28 PM
Yes, but the user has to wait for the first one to finish (in the background) before submitting the second one (in the foreground).
Rob
2006 Oct 04 7:25 PM
TH...
A tip to detect background processing...
No need for a parameter...
Check SY_BATCH for an 'X'
If sy-batch eq 'X'.
...program is running in background...
else.
...program is running in foreground...
Endif.
Dave...
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |