03-01-2006 7:51 PM
I'd like to download an internal table to the presentation server. i.e. "C:\TEMP\MYFILE.TXT' in batch mode. Unfortunately, GUI_DOWNLOAD prevents this.
All of my attempts to use OPEN DATASET don't create a file, either in foreground or background mode. I don't get an open file error but nothing gets created.
Is there a way to do this?
03-01-2006 7:58 PM
You can not use OPEN DATASET to download or upload files to the presentation. You can only use this to upload/download to the application server. In doing this, it will work in both foreground and background. There is no "easy" way to download to the presentation server from a background process. I'm not saying that it can't be done, but you must jump thru a couple of hoops to do it.
Regards,
Rich Heilman
03-01-2006 7:58 PM
You can not use OPEN DATASET to download or upload files to the presentation. You can only use this to upload/download to the application server. In doing this, it will work in both foreground and background. There is no "easy" way to download to the presentation server from a background process. I'm not saying that it can't be done, but you must jump thru a couple of hoops to do it.
Regards,
Rich Heilman
03-01-2006 8:01 PM
Hi ,
OPEN DATA Sets -- For Uploading/Down loading fiels from Application server.
Please define a file path in your program and then use "OPEN DATASET L_FILE FOR OUTPUT ".
Then the O/P data will write to that file on application server.
Example:
*---opens application server file
OPEN DATASET L_FILE FOR OUTPUT IN BINARY MODE.
"encoding default.
IF SY-SUBRC = 0.
LOOP AT I_TAB1.
TRANSFER I_TAB1 TO L_FILE.
ENDLOOP.
*--- closes error file
CLOSE DATASET L_FILE.
ELSE.
message i000 with 'Unable to download PDF file'.
ENDIF.
Regards,
Lanka
Rich : you are too fast and I am fully agree with Rich.
Message was edited by: Lanka Murthy
03-01-2006 8:41 PM
Thanks, folks. I sort of figured that it would be difficult because how would the batch job know who/where the job was started.
I'll contact my basis folks and have them create an output directory for the user.
03-01-2006 8:48 PM
03-01-2006 8:59 PM
What we do is run a batch job that creates a file on the application server. Then the user runs a program from R3 that uploads the file from the server and uses something like GUI_DOWNLOAD to write to the PC. You could as well open EXCEL directly in the second job.
Rob
03-02-2006 4:13 PM
Thanks, Rob.
This is the scenario I decided to go with.
The users whine a bit, but cest la vie
03-13-2014 2:56 PM
Hello,
I'm got encountered with the same problem. We have generated file on application server successfully but download to presentation server is not working as i have used gui_download.We have set batchjob but because we used download function module job is getting cancelled as this is foreground activity.
We removed gui_download code and i tried to download file using open dataset and transfer method but it is not writing file on ps.
Please suggest other way to achieve the requirement.
03-14-2014 12:37 AM
Hi,
Ask the admins to create "mount"/"share" of AS folder that users can access from their clients..?
cheers,
Janis