07-10-2015 10:48 AM
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
07-10-2015 10:58 AM
07-10-2015 11:46 AM
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
07-10-2015 12:48 PM
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
07-10-2015 1:59 PM
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
07-10-2015 2:58 PM
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
07-10-2015 2:02 PM
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.
Kind Regards
Tolga