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: 

upload and download of files from different server

Former Member
0 Kudos

Hi Experts,

I have a requirement.....

i have to rename some files that are stored in Client PI server.


so my client requirement is i need to pick the files from PI server get that file to ECC and then Rename the file and download it back to the same PI path.  after i download back to PI path i have to delete the original file and just keep the renamed file.


i have written the code for renaming the file.


i want to know how can i get the file from PI path do my job and download it back to same PI path...


is this possible?


if yes please suggest how can i achieve this task..



Regards,

Nawaz

6 REPLIES 6

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

I have a doubt, what if my client does not have FTP folder then how i can achieve it...????

it is just a OS level folder in PI from which i need to read the files...

please correct me if i am wrong...

NAWAZ

0 Kudos

Hi,

Use open dataset , for reading the file

use the FM 'EPS_DELETE_FILE ' for deleting the file...

EPS_FTP_PUT (copy file) --- leave IMPORTING parameter RFC_DESTINATION empty


EPS_CLOSE_FILE

EPS_DELETE_FILE

EPS_GET_FILE_ATTRIBUTES

EPS_OPEN_INPUT_FILE

EPS_OPEN_OUTPUT_FILE

EPS_SEEK_INPUT_FILE

EPS_SEEK_OUTPUT_FILE

Thanks and Regards,

Vijay SR

Juwin
Active Contributor
0 Kudos

Easiest way is to ask your Basis team to map the network folder onto the SAP application server. Then you will be able to just use OPEN DATASET, to access the files.

Thanks,

Juwin

Former Member
0 Kudos

Hi,

Thanks i got it. But i need to pick the file from PI server into ECC do my requirement on the file and then i have to place it back to the same PI folder.

so my doubt is after i get it to ECC and do my changes how will i place back the file to the same folder..????

and after i do my program i have to set a background job fa the same and it should run automatically...

Please advice...

Regards,

NAWAZ

tolga_polat
Active Participant
0 Kudos

Hi Mohammed,

If ECC server and PI server are in same network you can use open dataset to read or change. delete dataset is to delete. Also you need authorization between both server. Usually ECC server admin user has to have authorization for other server.

If you are not in same network, you need to use FTP or Webservice for this task.

Also check this post :

Kind Regards

Tolga