2009 Mar 02 7:08 PM
I have a program that copies Attachments to an external folder. When I run the program from SE80, it works fine. When I run it as a scheduled job, the files do not copy. How can I correct this?
2009 Mar 02 7:28 PM
If you are running in background then you need to use
call function 'SO_DOCUMENT_READ_API1'
and then
OPEN DATASET ........ in Binary Mode
Then you can make FTP to external folder
a®
I have a program that copies Attachments to an external folder. When I run the program from SE80, it works fine. When I run it as a scheduled job, the files do not copy. How can I correct this?
2009 Mar 02 7:18 PM
2009 Mar 02 7:22 PM
When you schedule a job in background you can only save the file in the application server and not to the presentation server... Try to save that file in the application server.
2009 Mar 02 7:23 PM
Yes, Copied to a NT directory.
I am not familiar with Application Server. Can I set up a Application server that points to a NT Directory?
2009 Mar 02 7:28 PM
If you are running in background then you need to use
call function 'SO_DOCUMENT_READ_API1'
and then
OPEN DATASET ........ in Binary Mode
Then you can make FTP to external folder
a®
2009 Mar 02 8:37 PM
Is the FTP my only option or can I create an application server that points to my NT folder
2009 Mar 02 8:40 PM
Tr. AL11 > configure button > give the details of your server..
and you can use open dataset to write file into that path
2009 Mar 02 8:40 PM
You can't create a application server which will point to your NT folder.
But you can store the file in application server and later you can download the file by using transaction CG3y
2009 Mar 02 8:52 PM
Talk with your basis team, i think they can create a shared folder and map that in AL11.
Please take expert opinion of basis
a®
2009 Mar 02 8:52 PM
To write the data to application server:
open dataset 'suresh1file' for output in text mode. " suresh1file is a file name in the home directory - check AL11
LOOP AT ITAB1.
TRANSFER ITAB1 TO 'suresh1file'.
delete itab1.
ENDLOOP.
close dataset 'suresh1file'.
To read the data from application server:
open dataset 'suresh1file' for input in text mode.
do.
read dataset 'suresh1file' into itab2.
append itab2.
clear itab2.
if sy-subrc <> 0.
exit.
endif.
enddo.
close dataset 'suresh1file'.
regards,
~Satya
2009 Mar 04 10:10 PM