Application Development and Automation 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: 
Read only

SO_OBJECT_DOWNLOAD

former_member431412
Participant
0 Likes
2,069

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?

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
1,831

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

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?

10 REPLIES 10
Read only

Former Member
0 Likes
1,831

Copying to the PC?

Rob

Read only

Former Member
0 Likes
1,831

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.

Read only

former_member431412
Participant
0 Likes
1,831

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?

Read only

former_member194669
Active Contributor
0 Likes
1,832

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

Read only

former_member431412
Participant
0 Likes
1,831

Is the FTP my only option or can I create an application server that points to my NT folder

Read only

0 Likes
1,831

Tr. AL11 > configure button > give the details of your server..

and you can use open dataset to write file into that path

Read only

0 Likes
1,831

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

Read only

0 Likes
1,831

Talk with your basis team, i think they can create a shared folder and map that in AL11.

Please take expert opinion of basis

Read only

Former Member
0 Likes
1,831

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

Read only

former_member431412
Participant
0 Likes
1,831

Thanks to all for you help. It is greatly appreciated.